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?
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]").
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/
Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!
About This Community
|Asked: 11/10/15, 12:08 PM|
|Seen: 589 times|
|Last updated: 11/10/15, 3:10 PM|