Skip to content

Commit

Permalink
[IMP] on prem password reset final edits
Browse files Browse the repository at this point in the history
  • Loading branch information
tiku-odoo committed Apr 30, 2024
1 parent 70cf52c commit 50d9979
Showing 1 changed file with 29 additions and 28 deletions.
57 changes: 29 additions & 28 deletions content/administration/on_premise/deploy.rst
Original file line number Diff line number Diff line change
Expand Up @@ -598,26 +598,26 @@ It should be stored securely, and should be generated randomly e.g.
$ python3 -c 'import base64, os; print(base64.b64encode(os.urandom(24)))'
which will generate a 32 characters pseudorandom printable string.
which generates a 32-character pseudorandom printable string.

Reset the master password
-------------------------

There may be instances where the master password is misplaced or compromised and needs to be reset.
The following process is for system administrators of an Odoo on-premise database to manually reset
and re-encrypt the master password.
There may be instances where the master password is misplaced, or compromised, and needs to be
reset. The following process is for system administrators of an Odoo on-premise database detailing
how to manually reset and re-encrypt the master password.

.. seealso::
For more information about changing an Odoo.com account password, see this documentation:
:ref:`odoocom/change_password`.

When creating a new on-premise database, a random master password is generated. Odoo recommends
using this password to secure the database. This password is implemented by default so there is a
using this password to secure the database. This password is implemented by default, so there is a
secure master password for any Odoo on-premise deployment.

.. warning::
When creating an Odoo on-premise database the installation is accessible to anyone on the
internet until this password is set to secure the database.
internet, until this password is set to secure the database.

The master password is specified in the Odoo configuration file (`odoo.conf` or `odoorc` (hidden
file)). The Odoo master password is needed to modify, create, or delete a database through the
Expand All @@ -626,7 +626,7 @@ graphical user interface (GUI).
Locate configuration file
~~~~~~~~~~~~~~~~~~~~~~~~~

First, :guilabel:`Open` the Odoo configuration file (`odoo.conf` or `odoorc` (hidden file)).
First, open the Odoo configuration file (`odoo.conf` or `odoorc` (hidden file)).

.. tabs::

Expand All @@ -645,19 +645,20 @@ First, :guilabel:`Open` the Odoo configuration file (`odoo.conf` or `odoorc` (hi
Change old password
~~~~~~~~~~~~~~~~~~~

Then, modify the old password in the configuration file to a temporary password.
Once the appropriate file has been opened, proceed to modify the old password in the configuration
file to a temporary password.

.. tabs::

.. tab:: Graphical user interface

After locating the configuration file, open it using a (:abbr:`GUI (graphical user
interface)`). This can be achieved by simply double clicking on the file and the device should
have a default :abbr:`GUI (graphical user interface)` to open the file with.
interface)`). This can be achieved by simply double clicking on the file. Then, the device
should have a default :abbr:`GUI (graphical user interface)` to open the file with.

Next, modify the line to the master password `admin_passwd = $pbkdf2-sha…` to `admin_passwd =
newpassword1234`. This password can be anything as long as it is saved temporarily. Modify all
characters after the `=`.
Next, modify the master password line `admin_passwd = $pbkdf2-sha…` to `admin_passwd =
newpassword1234`, for example. This password can be anything, as long as it is saved
temporarily. Make sure to modify all characters after the `=`.

.. example::
The line appears like this:
Expand All @@ -668,15 +669,15 @@ Then, modify the old password in the configuration file to a temporary password.

.. tab:: Command-line interface

Modify the line to the master password using the following Unix command.
Modify the master password line using the following Unix command detailed below.

Connect to the Odoo server's terminal via Secure Shell (SSH) protocol and edit the
Connect to the Odoo server's terminal via Secure Shell (SSH) protocol, and edit the
configuration file. To modify the configuration file, enter the following command:
:command:`sudo nano /etc/odoo.conf`

After opening the configuration file, modify the line to the master password `admin_passwd =
$pbkdf2-sha…` to `admin_passwd = newpassword1234`. This password can be anything as long as it
is saved temporarily. Modify all characters after the `=`.
After opening the configuration file, modify the master password line `admin_passwd =
$pbkdf2-sha…` to `admin_passwd = newpassword1234`. This password can be anything, as long as
it is saved temporarily. Make sure to modify all characters after the `=`.

.. example::
The line appears like this:
Expand All @@ -686,29 +687,29 @@ Then, modify the old password in the configuration file to a temporary password.
The modified line appears like this: `admin_passwd = newpassword1234`

.. important::
It is essential that the password is changed to something else rather than triggering a new
It is essential that the password is changed to something else, rather than triggering a new
password reset by adding a semicolon `;` at the beginning of the line. This ensures the database
is secure throughout the entire password reset process.

Restart Odoo server
~~~~~~~~~~~~~~~~~~~

Following setting the temporary password, a restart of the Odoo server is necessary.
After setting the temporary password, a restart of the Odoo server is **required**.

.. tabs::

.. tab:: Graphical user interface

To restart the Odoo server, first, type `services` into the Windows :guilabel:`Search Bar`.
Then, select the :guilabel:`Services` application and scroll down to the :guilabel:`Odoo`
To restart the Odoo server, first, type `services` into the Windows :guilabel:`Search` bar.
Then, select the :guilabel:`Services` application, and scroll down to the :guilabel:`Odoo`
service.

Next, right click on :guilabel:`Odoo` and select :guilabel:`Start` or :guilabel:`Restart`.
Next, right click on :guilabel:`Odoo`, and select :guilabel:`Start` or :guilabel:`Restart`.
This action manually restarts the Odoo server.

.. tab:: Command-line interface

Then restart the Odoo server by typing the command: :command:`sudo service odoo15 restart`
Restart the Odoo server by typing the command: :command:`sudo service odoo15 restart`

.. note::
Change the number after Odoo to fit the specific version the server is running on.
Expand All @@ -723,13 +724,13 @@ browser.
Replace `server_ip` with the IP address of the database. Replace `port` with the numbered port
the database is accessible from.

Next, click :guilabel:`Set Master Password` and type in the previously selected temporary password
Next, click :guilabel:`Set Master Password`, and type in the previously-selected temporary password
into the :guilabel:`Master Password` field. Following this step, type in a :guilabel:`New Master
Password`. The :guilabel:`New Master Password` will be hashed or encrypted once the
Password`. The :guilabel:`New Master Password` is hashed (or encrypted), once the
:guilabel:`Continue` button is clicked.

The password has been successfully reset, and a hashed version of the new password now appears in
the configuration file.
At this point, the password has been successfully reset, and a hashed version of the new password
now appears in the configuration file.

.. seealso::
For more information on Odoo database security, see this documentation:
Expand Down

0 comments on commit 50d9979

Please sign in to comment.