Odoo Help

0

How to recover admin password?

By
Dr Obx
on 3/2/16, 10:52 AM 2,708 views

Guys, 

How to recover admin password if you don't have access to the email address or you just not set it before you changed a password and logged off from the system ?

I know, it is a stu..d question but it happens sometimes.

Couple of weeks ago My boss (he just love to do it) changed admin password then forgot. So I've had no other way  and recovered database from the backup I remember the password, however some data were lost, some of course we restored based on what people remembered.

SO, is there any other way to get into the system as a admin or change admin's password ?

Password in database is encrypted .....

By the way, admin is the only user with full access rights so none of the other users can change system parameters or passwords.

...........

...........

Of course there is  ............. a very simple way ............ to change it .............

...........

...........


2
Axel Mendoza
On 3/2/16, 11:22 AM

You could set a new password directly in the database at the res_users table, put your new password on the field "password" and set to empty the field password_crypt. After that just put the new password at the login page and you will be ok

Another way

Is doing the same as Odoo for encrypt the password and set the new_password to the password_crypt field, like:

from passlib.context import CryptContext
crypt_context = CryptContext(
['pbkdf2_sha512', 'md5_crypt'],
deprecated=['md5_crypt'],
)
new_password = crypt_context.encrypt(password)


A hahahaha, Hi Axel ..... yes in did :) I was just curious do people know about it ;)

Dr Obx
on 3/2/16, 11:24 AM

So you are testing people here? :)

Axel Mendoza
on 3/2/16, 11:26 AM

One point for you :)

Dr Obx
on 3/2/16, 11:26 AM

It happened to me some time ago and I was looking for the way how to get an access :) and that was the easiest possible way. ;)

Dr Obx
on 3/2/16, 11:31 AM

But the question was "how to recover" ;) if it is possible.

Dr Obx
on 3/2/16, 11:33 AM

If you have no access to the database directly ;)

Dr Obx
on 3/2/16, 11:35 AM

You cannot retrieve the old password because it's encrypted, see the answer update for another way to set the new password.

Axel Mendoza
on 3/2/16, 11:39 AM

Thank you, and this is the substantial answer I expected the most :)

Dr Obx
on 3/2/16, 11:42 AM
0
Ermin Trevisan
On 10/22/16, 10:52 AM

Axel's alternative solution for Odoo 9.0 and newer simplified as command line commands can be found here:

https://github.com/odoo/odoo/issues/9806#issuecomment-255487372

0
Odoo
On 3/2/16, 9:48 PM

Another Way..................


First connect to postgressql 


Run this query in res_users table then u can login as admin and password=admin


update  res_users set password='admin'  where login='admin'

Thank you

Dr Obx
on 3/3/16, 5:13 AM
0
Ray Carnes
On 3/2/16, 8:48 PM

An alternative method:

1. Allow the admin password to be reset.

insert into base_config_settings(auth_signup_reset_password) values(true); 
update res_partner set signup_type='reset', signup_token='rsvabcdefghijykalklk', signup_expiration=to_timestamp('20200411','YYYYMMDD') where id=(select partner_id from res_users where id=1); 

2. Reset the password

http://[ODOO SERVER]:[PORT]/web/reset_password?token=rsvabcdefghijykalklk&login=admin 

About This Community

This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

Register

Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

1 follower(s)

Stats

Asked: 3/2/16, 10:52 AM
Seen: 2708 times
Last updated: 10/22/16, 10:52 AM