Skip to content

Instantly share code, notes, and snippets.

@yurytello
Last active March 18, 2022 07:49
Show Gist options
  • Save yurytello/897c32535cb26f20ee91 to your computer and use it in GitHub Desktop.
Save yurytello/897c32535cb26f20ee91 to your computer and use it in GitHub Desktop.
Hack to reset the admin password of Odoo
Reset admin Password
1) Obtener el login del administrador
=> select login from res_users where id=1;
2) Verificar que tenga habilitado el parámetro auth_signup_reset_password
=> update base_config_settings set auth_signup_reset_password=true;
# Si NO nay registros entonces insertar un nuevo registro
=> insert into base_config_settings(auth_signup_reset_password) values(true);
3) Crear un token de reset_password para el administrador
=> 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);
4) Ingresar para resetear la clave del administrador
http://mydb.odo.pw/web/reset_password?token=rsvabcdefghijykalklk&login=admin
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment