Skip to Content
Menu
This question has been flagged
4 Replies
19874 Views

Hi Everyone. Iam new to odoo. I have an error regarding database creation in Odoo 10. I have tried all solutions given in internet like( Websites, Odoo Forums).

I am writing same admin_password in master password but when i opened odoo-server.conf then db_user and db_password is changed automatically to below code. Iam now running the server by giving db_user and db_password to configurations of LiClipse(Compiler). It runs but can't create new database. I have also tried that to make new user and start this server but all in vain.

Kindly give me a solution.

Odoo-server.conf code:

[options]
; This is the password that allows database operations:
; admin_passwd = admin
db_host = localhost
db_port = 5432
db_user = rude
db_password = postgres
#addons_path = /usr/lib/python2.7/dist-packages/odoo/addons
[options]
#logfile = /var/log/odoo/odoo-server.log
addons_path=/home/rudehunk/odoo/projects/la10e/enterprise/addons,/home/rudehunk/odoo/projects/la10e/addons,/home/rudehunk/odoo/projects/la10e/my_addons
xmlrpc_port = 8015

also you can see in odoo.conf file code above that db_user is rudehunk and db_password is postgres which i have not typed in postgres -ubuntu user and password( correct one ->i.e. db_user=odoodev db_password=admin). Waiting for reply. Thanks in advance.

Avatar
Discard
Best Answer

First some definitions:

  • admin_passwd - This is the password you use in the GUI database manager when creating, backing up or deleting a database

  • db_user - This is the Postgres user that creates and owns the database Odoo uses

  • db_password - This is the password for the Postgres password mentioned before.


Now, without getting too technical (you can learn more about hashes on the internet), here is why your approach fails:

admin_passwd is saved as the HASH of your password. It is not saved in plain text. You can't set the password by writing it in plaintext inside the config file. That is why you are not able to authenticate. If you wanted to set the password trough the config file you would need to write the hash of the password you wish to have (Odoo uses PBKDF2).

However the easiest way is to just delete the entry in your config file and set the desired password trough the user interface in the database manager.

1. Delete admin_passwd from config file

2. Restart Odoo

3. Go to the manage databases section in the GUI

4. You will get an alert about not having set a password, and will have the option to set your password there.


Once you set your password trough the GUI come back and check your odoo.config, you will see the admin_passwd entry was added automatically and you will see the HASH of your password, not your plain text password.

Avatar
Discard
Best Answer

Uncomment ; admin_passwd = admin:
; admin_passwd = admin --> admin_passwd = admin
then use admin as master password

Avatar
Discard
Best Answer

I've same problem with Odoo12 on Centos7 VPS.

in my config file i've setting

admin_passwd = password

and

db_password = password

But when I create a new Db return Access denied

Avatar
Discard

Hey, I answered the question and explained (without trying to get too technical) why your approach fails. If you have more questions/issues feel free to ask.

Solved! Thanks