Recover Odoo admin and mail server password

Months ago, I installed the Odoo server and it worked perfectly!

The problem is that I forgot the identification (email / pass) for the administrator, which is very bad. After removing the server and reinstalling it, I found that the database was not erased. So this has not changed!

Please help me find an email administrator and password ?

I am not very familiar with progresql, but res_users displays empty passwords:

enter image description here

+7
email passwords openerp odoo
source share
2 answers

You can change the administrator password using progresql from the terminal. You just need to do like these

odoo@odedra :~$ psql testing_db psql (9.1.14) Type "help" for help. testing_db=# UPDATE res_users SET password='new_password' WHERE login = 'admin'; UPDATE 1 

where test_db is the name of the database.

Now log in with the new password and change the user data no matter what you want.

+10
source share

You need to generate a password using the hash algorithm pbkdf2_sha512. Then update the record ID = 1 with password password_crypt, not with password.

For example:

  • Generating a hash from python code:

    from passlib.context import CryptContext

    print CryptContext(['pbkdf2_sha512']).encrypt('<PASSOWORD>')

  • Then:

    update res_users set password='' ,password_crypt='<HASH>' where id = <ID>;

Replace the generated output from the script and the designated identifier.

+6
source share

All Articles