📄 Reset user password  from databaseReset user password  from database

Reset user password  from database


  • Connect to the server hosting Odoo using SSH or terminal.
  • Log in to PostgreSQL with sudo -u postgres psql or sudo -u <db_user> psql.
  • List all databases with \l to identify the Odoo database.
  • Connect to the Odoo database using \c <db_name>.
  • List all users in the database with SELECT id, login, name FROM res_users; and find the admin user.
  • Use Python or an online bcrypt generator to hash your new password.
  • Update the admin password with UPDATE res_users SET password = '<new_hashed_password>' WHERE login = 'admin';.
  • Verify the password update with SELECT id, login, password FROM res_users WHERE login = 'admin';.
  • Exit PostgreSQL using \q.
  • Restart the Odoo service with sudo service odoo restart.
  • Log in to Odoo using the username admin and the new password