Knowledgebase

Question About Servers

How to Reset or Change Your Odoo Master Password Print

  • 60

In this guide, we will explain how to change or reset your Odoo Master Password from the graphical interface, as well as using the command line of your Linux server.

 

Odoo Master Password

This password is specified in the Odoo configuration file (usually named odoo.conf). You might need it if you want to manage the Odoo databases through the graphical interface (can be usually found at https://localhost:8069/web/database/manager on a fresh Odoo installation).

In this article, we will be changing the Odoo Master Password.

 

Click here to learn how to change your Admin Password instead. Alternatively, to change your Database Password, follow this link.

 

Change or Reset Your Master Password

Odoo Master Password allows you to modify Odoo databases. If you know your current password and simply want to change it, it can be done from your browser via the Odoo graphical interface.

If, on the other hand, you forgot your Odoo Master Password, you will need to either reset it or change it. Both actions will need to be done manually from your Odoo server's command line. Thankfully, resetting Odoo Master Password is quite simple.

1. Change Your Master Password From the Graphical Interface

Navigate to the following page in your browser:

http://server_ip:port/web/database/manager

Note: change server_ip to the IP address of your Odoo server. Change port to the port number that your Odoo instance is configured to run on (standard is 8069).

 

You will see a page with database settings. Click on the 'Set Master Password' button.

Enter your old password, followed by the new one.

Click on 'Continue' to finish the process.

 

2. Resetting Odoo Master Password From the Command Line

If you don't remember your current Master Password, you will need to connect to your server's terminal via SSH and edit the configuration file.

Once you are on your Odoo server, execute the following commands to reset your Master Password.

sudo nano /etc/odoo.conf

 

You have opened the configuration file. Now, find the line that starts with admin_passwd. It will look something like this:

admin_passwd = $pbkdf2-sha512$10001$0dr7v7eWUmptrfW.9z6HkA$w9j9AMVmKAP17OosCqDxDv2hjsvzlLpF8Rra8I7p/b5746rghZ8WrgEjDpvXG5hLz1UeNLzgFa81Dr/bx.2b7hg

 

Put a semicolon at the beginning of that line so that it looks like this:

;admin_passwd = $pbkdf2-sha512$10001$0dr7v7eWUmptrfW.9z6HkA$w9j9AMVmKAP17OosCqDxDv2hjsvzlLpF8Rra8I7p/b5746rghZ8WrgEjDpvXG5hLz1UeNLzgFa81Dr/bx.2b7hg

 

Save the file and exit it by pressing Ctrl+X, followed by Y and then Enter.

 

Restart the Odoo service:

sudo service odoo13 restart

 

Now, when you go to the database page, you will see that Odoo allows you to reset your password.

Go to the following URL:

http://server_ip:port/web/database/manager

Note: change server_ip to the IP address of your Odoo server. Change port to the port number that your Odoo instance is configured to run on (standard is 8069).

 

Click on 'set a master password'.

Enter the new password and click 'Continue':

You have successfully reset your password.

 

3. Changing Your Odoo Master Password From the Command Line

If you don't have access to the graphical interface, you will need to change your Odoo Master Password from the command line.

The process involves logging into your Odoo server, creating a hashed (i.e. hard to read) version of the new password, and changing the password value in the Odoo configuration file.

Once you're in the command line of your Odoo server, use the following commands to change your Odoo master password.

Change the current Linux user to odoo:

sudo su odoo 

 

Activate the Odoo virtual environment to have access to the same modules as your Odoo instance:

source /opt/odoo/odoo13-venv/bin/activate

 

Enter the Python shell:

python3

 

Import the needed module:

from passlib.context import CryptContext

 

Now, let's transform and encrypt your new master password using the PBKDF2 SHA512 scheme. The command below will do it, and then display the result:

print(CryptContext(schemes=['pbkdf2_sha512']).encrypt('new_master_password'))

Note: change new_master_password to an actual password that you chose as your new master password. The value must stay wrapped in single quotation marks.

 

When you hit Enter, there will appear long string of text, like this:

$pbkdf2-sha512$10001$0dr7v7eWUmptrfW.9z6HkA$w9j9AMVmKAP17OosCqDxDv2hjsvzlLpF8Rra8I7p/b5746rghZ8WrgEjDpvXG5hLz1UeNLzgFa81Dr/bx.2b7hg

Copy it or write it down for later use.

 

When you're ready, leave the Python shell:

exit()

 

Exit the odoo Linux user:

exit

 

Open your Odoo configuration file:

sudo nano /etc/odoo.conf

 

Find the line that starts with admin_passwd. It will look something like this:

admin_passwd = $pbkdf2-sha512$10001$0dr7v7eWUmptrfW.9z6HkA$w9j9AMVmKAP17OosCqDxDv2hjsvzlLpF8Rra8I7p/b5746rghZ8WrgEjDpvXG5hLz1UeNLzgFa81Dr/bx.2b7hg

 

As you can see, admin_passwd is a variable, and everything that goes after the '=' sign is a value. The current value represents the hashed version of the old password.

You need to change it to the hashed version of the new password (you created it a few steps above).

Delete the old value and enter the new one.

When you're done, save the file and exit it by pressing Ctrl+X, followed by Y and then Enter.

 

Finally, restart the Odoo service:

sudo service odoo13 restart

 

Congratulations, you have successfully changed your Odoo Master Password from the command line.

 

If you are a SolaDrive customer and use one of our Odoo VPS Hosting services, you can simply ask our expert Odoo specialists to change your Master Password for you. We are available 24/7 via chat or ticket and will take care of your request immediately.


Was this answer helpful?

« Back

Enterprise-Grade Hardware

  • Samsung
  • Juniper
  • Western Digital
  • Supermicro
  • LSI
  • Intel
  • R1Soft Backups
  • cPanel
  • MySQL
  • Parallels
  • HP Partner