Skip to Content
Menu
This question has been flagged
2 Replies
3858 Views

I've recently set up Odoo, haven't done a backup yet.   Using an account that logs in with google, I changed the email address of that user to one that is not the same as the account I auth to google with, and worse, it matches the one that is the admin account I set up Odoo with. Now I can't log in with ether account. Is my only recourse to nuke the database and start over? I've set up some other stuff and users so that is not ideal. If I knew the database credentials I could probably change the email back again. Suggestions?



Avatar
Discard
Author Best Answer

I fixed it.   This wasn't a password issue. Odoo allowed me to modify my second admin account so that two accounts had the email email address. I couldn't login with Oauth to the second one because the email address no longer matched, and it was getting an error trying to login to the native one. 

What I did to fix it was --  I su'd to the postgres user, and looked for tables in my database, found the res_users table and changed the erroneous 'login' back to the original. 

# select * from "res_users";

I noted the ID of the account that was supposed to connect via Oauth, which was 22.  

# update "res_users" set login='my_Oauth_email_address' where id=22;

I'm doing a backup now :-)

Avatar
Discard
Best Answer

The default admin user has the database ID 1 (for Odoo version 11 and lower) or 2 for Odoo version 12 and 13.

Please check my little tutorial here fo resetting the password:

https://www.odoo.com/es_ES/forum/ayuda-1/question/how-to-reset-the-odoo-admin-user-password-a-summary-for-different-odoo-versions-131992

Avatar
Discard