Recover admin password and email Odoo server

拥有回忆 提交于 2019-12-03 13:28:11

You may change admin 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 testing_db is database name.

Now login with new password and change user details whatever you want.

You need to generate password with pbkdf2_sha512 hashing algorithm. Then update the record id = 1 with password_crypt field not password.

For example:

  • Generating 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 , with the generated output from the script and designated id.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!