1

How do I su to the odoo account?

nicholas@mordor:~$ 
nicholas@mordor:~$ sudo su odoo -
This account is currently not available.
nicholas@mordor:~$ 
nicholas@mordor:~$ awk -F: '{ print $1 }' /etc/passwd | grep odoo
odoo
nicholas@mordor:~$ 
nicholas@mordor:~$ ll /etc/odoo/odoo.conf 
-rw-r----- 1 odoo odoo 214 Dec 15 01:28 /etc/odoo/odoo.conf
nicholas@mordor:~$ 

Presumably I should be editing the odoo.conf file as the odoo user.

I can switch to root with sudo su root - of course.

Perhaps the answer is that "you don't" as:

nicholas@mordor:~$ 
nicholas@mordor:~$ cat /etc/passwd | grep odoo
odoo:x:132:140::/var/lib/odoo:/usr/sbin/nologin
nicholas@mordor:~$ 

is this just how odoo is configured?

4
  • 1
    You cannot switch to any user that ends in /usr/sbin/nologin – Terrance May 1 at 5:06
  • thanks @Terrance I didn't see that in the passwd file at first. (it's glaringly obvious of course: nologin couldn't be clearer.) – Nicholas Saunders May 1 at 5:10
  • use sudo -i instead of sudo su to switch to root, sudo -u user -i for user I believe – bac0n May 1 at 5:19
  • 2
    ... and think it should be sudo su - odoo – bac0n May 1 at 5:27
1

Presumably I should be editing the odoo.conf file as the odoo user."

No.

Make the file writable for group and add your admin user to the odoo group. Use ...

sudo chown 660 /etc/odoo/odoo.conf
sudo usermod -a -G odoo $USER

... and there is no need for switching and you can use your normal admin account. It is the easiest and best method to allow permission to edit the file.

1

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.