How to recover odoo admin password?

forgot odoo administrator login passowrd

How to Reset Odoo Superuser / Admin Password from Database if you have forgotten the password?

It gets very tedious and frustrating sometimes when we cannot recall our Odoo superuser password and are not able to retrieve it by any means. Well, don’t worry now here is the solution to the problem. We can reset the password in the database. Following is how to do this:

Odoo Passwords

Odoo system has three different passwords:

1) Parameter admin_passwd in odoo-server.conf

This password allows you to manage databases, when you browse addresslocalhost: 8069 / web / database / managerIn this case, to set new: Remove the semicolon at the line start, set your password and restart odoo.

2) Paremeter db_password in odoo-server.conf

This is the password of the role with the name odoo in postgresql (parameter db_user = odoo in odoo-server.conf)In this case, to set new, see your case this password probably is empty (db_password = False)

3) Main Odoo user password, user with login = admin (or with your email).

In this case, to set new, replace the password and hash in the database with the new one by running this SQL query:UPDATE res_users SET password = "NEW_PASSWORD",password_crypt = NULL WHERE id=1;To retrieve login:SELECT login, password FROM res_users WHERE id=1;

IMPORTANT!!! After update res_users (after setting NEW_PASSWORD) you login to Odoo and set new password again (If you need crypted password in database)

I hope this helps everyone. If you find any issues or errors or have any suggestions, feel free to comment, and I will be more than happy to update the content.