Odoo is the world's easiest all-in-one management software. It includes hundreds of business apps:
CRM | e-Commerce | Accounting | Inventory | PoS | Project management | MRP | etc.
This runs fine as my normal user: `cd /opt/odoo; python openerp-server --addons-path=addons`
But when I want to run it as another user, e.g. through
sudo su odoo -c "cd /opt/odoo; python openerp-server --addons-path=addons"
I get this error: `OperationalError: FATAL: role "odoo" does not exist`
I found out it breaks less after `createuser odoo` but then my existing installation is not there anymore. What is a smooth way to change the user running the process? Where is the database configuration?
How come it's breaking for odoo while it's working for my normal user and how to fix it?
Are there other things to change as well?
OperationalError: FATAL: role "odoo" does not exist`
This is a PostgreSQL error, saying that the database user odoo does not exist.
It probably means that your postgresql is using peer or ident authentication: instead for asking for user and password (postgres user and password, not your openerp one! they are different) it runs as the same user as the OS one. So, when you change the user you run the process as with sudo su, you are also chaning the user you're trying to connect to postgresql with.
"createuser odoo" creates an odoo user in postgres, but you probably created the openerp db with your "normal" user, so odoo has no databases associated with it.
You should decouple your system user from your database user. You can, for example, use "normal" postgresql password authentication, that lets you specify which user you want to connect to postgres as.
I understand that you have set up the whole installation based on your normal user instead of an openerp or odoo user. Most howtos explain how you set it up for such specific user, which keeps you more in control of this specific process and adds to your systsem's security.
If you look at this forum's Howto or the Opensourcerer's: https://www.odoo.com/forum/Help-1/question/How-to-install-OpenERP-V70-on-Ubuntu-1204-from-Launchpad-sources-2562, http://www.theopensourcerer.com/2012/12/how-to-install-openerp-7-0-on-ubuntu-12-04-lts/
You'll see howto create the openerp/odoo user correctly in postgres. Personally I'm not sufficiently skilled in Postgres to tell you in detail on how to change your current settings, but those howto's can hopefully help you out.
About This Community
This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.Register
Odoo Training Center
Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.Test it now
|Asked: 7/7/14, 2:15 PM|
|Seen: 3612 times|
|Last updated: 3/16/15, 8:10 AM|