Skip to Content

How to Reset Odoo Administrator Password?

November 5, 2026 by

Losing access to the administrator account in Odoo can paralyze your entire company's operations. Fortunately, resetting the Odoo administrator password is possible in several ways, and in this article, we'll present all proven methods for safely regaining access to the system.

Why should you know administrator password reset methods?

The administrator account in Odoo has the highest privileges in the system. It enables user management, configuration, modules, and all key aspects of ERP operations. Losing access to this account can mean being unable to perform critical business operations. Therefore, every IT administrator should know password reset procedures for different scenarios.

Method 1: Password Reset via User Interface (standard procedure)

The simplest password reset method works when the user has a configured email address and a working SMTP server in the Odoo system.

Step by step:

  1. On the login screen, click the "Reset Password" link
  2. Enter the email address assigned to the administrator account
  3. Check your inbox - you should receive a message with a reset link
  4. Click the link and set a new password
  5. Log in using the new password

Important: This method requires a properly configured SMTP server. If you're not sure whether your system has email sending configured, check out our article: How to configure SMTP for sending emails in Odoo?

Method 2: Password Reset via Direct Database Access

When you don't have access to email or SMTP is not configured, you can reset the Odoo administrator password directly in the PostgreSQL database.

Requirements:

  • Access to the server with the PostgreSQL database installed
  • Database management privileges
  • Basic SQL knowledge

Procedure:

  1. Log in to PostgreSQL:
    sudo -u postgres psql
  2. Select the Odoo database:
    \c database_name
  3. Generate a password hash. You can use the following SQL query, which will create a temporary, simple password, and then you'll change it through the interface:
    UPDATE res_users SET password='$pbkdf2-sha512$25000$qnVOqRWCsJZyrjXm3NtbKw$cEhqOGp2Z2d6Zlp3Zy90aEkuMy9hL25nSS5nZkEvZ2ZnLi5nLmdndC5nLy8uZ2dnZ2dnZ2cuLi8uLmdnLmcuZ2c' WHERE login='admin';
    This sets the password to: admin123 (change it immediately after logging in!)
  4. Or if you know the user ID (typically admin has ID=2):
    UPDATE res_users SET password='$pbkdf2-sha512$25000$qnVOqRWCsJZyrjXm3NtbKw$cEhqOGp2Z2d6Zlp3Zy90aEkuMy9hL25nSS5nZkEvZ2ZnLi5nLmdndC5nLy8uZ2dnZ2dnZ2cuLi8uLmdnLmcuZ2c' WHERE id=2;
  5. Exit PostgreSQL:
    \q
  6. Log in to Odoo using login 'admin' and password 'admin123', then immediately change the password to a strong and unique one

Security note: In Odoo, all passwords are stored as PBKDF2-SHA512 hash. You cannot set a password as plain text - the system requires a hashed value. The above example uses a pre-generated hash for access recovery purposes, but this password should be changed immediately after logging in.

Try Odoo for free

Method 3: Using a Python Script

For more advanced users who have access to the Python environment where Odoo is installed, you can use a script to generate the correct password hash.

Example Python script:

from passlib.context import CryptContext

# Odoo 17 uses pbkdf2_sha512
pwd_context = CryptContext(
    schemes=['pbkdf2_sha512'],
    pbkdf2_sha512__default_rounds=25000
)

new_password = 'YourNewPassword123!'
new_password_hash = pwd_context.hash(new_password)

print('Generated hash:')
print(new_password_hash)

Then you can enter the generated hash directly into the database:

UPDATE res_users SET password='generated_hash' WHERE login='admin';

Note: Make sure you're using the same version of the passlib library that is installed in your Odoo environment to ensure hash algorithm compatibility.

If you installed Odoo in a Python virtual environment, check our guide: How to install Odoo in a Python virtual environment?

Method 4: Using the odoo-bin Tool (CLI)

Odoo offers a command-line tool that allows user management, including resetting the Odoo administrator password.

Step by step:

  1. Navigate to the Odoo installation directory
  2. Run odoo-bin with the shell parameter:
    ./odoo-bin shell -d database_name -c /path/to/odoo.conf
    Or if you need to provide connection details:
    ./odoo-bin shell -d database_name --db_host=localhost --db_port=5432 --db_user=odoo --db_password=password
  3. In the Odoo Python console, execute:
    admin_user = env['res.users'].search([('login', '=', 'admin')], limit=1)
    if admin_user:
        admin_user.password = 'NewPassword123!'
        print(f'Password changed for user: {admin_user.login}')
    else:
        print('Admin user not found')
  4. Confirm changes (in Odoo 17 commit is automatic, but you can force it):
    env.cr.commit()
  5. Exit shell (Ctrl+D or type exit())

Alternative method via user ID:

env['res.users'].browse(2).password = 'NewPassword123!'
env.cr.commit()

Try Odoo for free

Contact us

Best Practices for Securing the Administrator Account

After regaining access to the administrator account, it's worth implementing the following security practices:

  • Use strong passwords - minimum 12 characters, with letters, numbers, and special characters
  • Regular password changes - at least once per quarter
  • Multi-factor authentication - Odoo 17 supports integration with 2FA/MFA systems through additional modules
  • Limit database access - only trusted individuals should have direct access
  • Regular backups - protect yourself against data loss
  • Monitor access logs - track login attempts and unauthorized access
  • Separate accounts for administrators - instead of a shared 'admin' account, create individual accounts with administrative privileges

Regarding backups, we recommend checking out the articles: How to back up an Odoo database? and How to set up automatic backups in Odoo?

Common Problems and Their Solutions

Problem: Password was changed, but I cannot log in

Solution: Check several things:

  • Make sure you're logging into the correct database (multi-database mode)
  • Clear browser cache and cookies
  • Check if the account hasn't been deactivated - in the database execute:
    UPDATE res_users SET active=true WHERE login='admin';
  • Restart the Odoo service after database changes

More information about multi-database mode can be found in the article: How to add multiple databases in one Odoo instance?

Problem: I don't remember the administrator login

Solution: You can check all users with administrator privileges in the database:

SELECT u.id, u.login, u.name, u.active 
FROM res_users u
JOIN res_groups_users_rel gur ON gur.uid = u.id
JOIN res_groups g ON g.id = gur.gid
WHERE g.name = 'Access Rights' 
AND u.active = true;

Or a simpler query showing the first accounts (typically ID=2 is admin):

SELECT id, login, name, active FROM res_users WHERE id <= 10 ORDER BY id;

Problem: "Access Denied" error despite correct password

Solution:

  • Check the Odoo logs for database-related errors
  • Make sure the user has the 'active' field set to true
  • Check if the user doesn't have IP restrictions (if configured)
  • Verify user permissions in access groups

Problem: System doesn't accept the new password

Solution: Odoo may have configured password policies. Check:

  • Minimum password length (default no restrictions, but can be configured)
  • Password complexity requirements
  • Password history - some configurations block reuse of previous passwords

FAQ - Frequently Asked Questions

Does resetting the administrator password affect Odoo system operation?

No, resetting the Odoo administrator password does not affect system functionality or database data. The change only concerns user authentication. All configurations, modules, and business data remain intact. The only thing that may happen is the need to re-login in all active sessions. However, it's always worth making a backup before any direct database operations as a good practice.

How often should I change the administrator password in Odoo?

It's recommended to change the administrator password at least once every 3 months. In case of suspected security breach, when someone who should no longer have access had access to the account, or after work completion by external consultants, you should immediately reset the password. In Odoo 17, you can also configure automatic password expiration reminders using additional security modules. The best practice is to implement a password rotation policy for all users with administrative privileges.

Can I completely delete the default administrator account?

Technically, it's possible to deactivate the default administrator account (physical deletion from the database is not recommended due to database relations), but it's not recommended as the only solution. A better practice is: change the default 'admin' account login to a unique name, set a very strong password, create separate accounts for individual administrators with named privileges, and limit access to the original admin account only to emergency situations. In Odoo 17, you can also use the group permissions system for precise access management without needing to use the main administrator account daily. Always keep one account with full administrator privileges as an emergency backup, but restrict access to it.

Summary

Resetting the Odoo administrator password is a process that can be done in several ways - from the simplest method through the user interface to more advanced database operations or via the CLI tool. Knowing all methods allows for quick access recovery in any situation, regardless of available resources and permissions.

Key information to remember:

  • Passwords in Odoo are always hashed using the PBKDF2-SHA512 algorithm
  • Changing password in the database requires using a hashed value
  • The fastest method is reset via interface (requires SMTP)
  • The safest method is using odoo-bin shell
  • Always create a backup before database operations

Remember that administrator account security is the foundation of the entire ERP system security. Regular backups, strong passwords, limited database access, and implementation of security policies are basic elements of protection for any organization using Odoo.

Need help managing your Odoo system? The KK Innovations team specializes in Odoo implementations and technical support. Contact us, and we'll help you not only with password resets but also with comprehensive configuration and securing your ERP system. We'll provide professional technical support, implement security best practices tailored to your organization, and help configure advanced access protection mechanisms for the system.

Contact us