Skip to Content
Menu
This question has been flagged

I still do not get this behavior of PostgreSQL. When you install both pg and odoo, everything runs fine and odoo connects to pg.

But when I try to login to pg, I discover that there is no login available or there is a login called `postgres` (according to blogs) but without password. I solved it once long back but cannot remember what I did.

can anyone explain?

Avatar
Discard
Best Answer

On Linux, Postgres can actually do a password-less login, using something called the Ident protocol.

Essentially, since Odoo and Postgres are running on the same machine, Postgres can ask the Operating System (the Linux kernel) the name of the system user that the Odoo process is running on, and check if the name matches the database user name. If they do, the login is automatic.

This is actually more secure than password based login, since there's no password to steal; on the other hand, it means you should run Odoo on its own Linux user, to avoid giving access to other programs.


To manually login as "postgres", you can login to the system user called "postgres" with the following command:

sudo su postgres

Then you can connect to any database on the system (try using "psql [database]").

Avatar
Discard
Best Answer

Dear Hesham,

You actually need to create a user on postgresql in order to be used by Odoo other than "postgres".

On windows install, this is usually created during Odoo installation and all process is automated (setup will request a username and password for postgres and setup everything for you).

On linux, you have to create a user which Odoo will use to connect to postgresql, with a password.This is the safer approach.

This information is later added to an Odoo config file, on specific variables (db_user=xxxxx / db_password = xxxxxx).

Please refer to the following Odoo install tutorial for more information: http://www.theopensourcerer.com/2014/09/how-to-install-openerp-odoo-8-on-ubuntu-server-14-04-lts/

Regards

Paulo

Avatar
Discard
Related Posts Replies Views Activity
4
Aug 22
107878
2
Oct 21
5478
4
Apr 18
7137
0
Apr 15
3733
1
Mar 15
8044