Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
5 ตอบกลับ
20094 มุมมอง

when i start odoo server at that time it will give me error like "Running as user 'root' is a security risk, aborting."

if any have idea about then please give replay as soon as possible..


อวตาร
ละทิ้ง
คำตอบที่ดีที่สุด

If you have installed odoo using guides available on internet and have created system user "odoo" first you need tooo change the user using 

sudo su - odoo -s /bin/bash
Then you can restart/start/stop the server without any error. 
Hope this helps.
อวตาร
ละทิ้ง
คำตอบที่ดีที่สุด

@sarkar

Odoo needs to be run it by an user different that root. I you are running it on localhost you could use your own user, but if you are running it on a server you need to create an user just to run Odoo.

This is how you could create a new user named odoo on the server:

adduser --system --group odoo

Depending of what you are using for manage the Odoo server you need to configure the new user as the own for run the Odoo server.

For upstart like services using start-stop-daemon, check that the line that execute Odoo have the --chuid specified like:

start-stop-daemon --start --quiet --pidfile ${PIDFILE} --chuid ${USER} --background --make-pidfile --exec ${DAEMON} -- ${DAEMON_OPTS}

For systemd services, check that the user to run the service is specified like:

[Unit]
Description=Odoo Open Source ERP and CRM
After=network.target postgresql.service
[Service]
Type=simple
User=odoo
ExecStart={service_bin} {service_args}
[Install]
WantedBy=multi-user.target

For supervisor services, check that the user to run the service is specified like:

[program:odoo_server_{instance}]
user=odoo
directory = {base_path}/{instance}
command = {service_bin} {service_args}
autostart=true
autorestart=true
stdout_logfile = {base_path}/logs/{instance}/{proy_name}/supervisor-out.log
stderr_logfile = {base_path}/logs/{instance}/{proy_name}/supervisor-err.log

อวตาร
ละทิ้ง

You accept my answer but forget to upvote it too, :)

ผู้เขียน คำตอบที่ดีที่สุด

it has also ask for odoo password where i can find it 


when i was use sudo su - odoo -s /bin/bash  command 

อวตาร
ละทิ้ง

that is the password for the new user odoo created, you could change it with this command
passwd odoo

ผู้เขียน

when i was install any app or library at that time it will give me an erro like odoo@ACRVCRSERVER1:~$ apt-get install postgresql E: Could not open lock file /var/lib/dpkg/lock - open (13: Permission denied) E: Unable to lock the administration directory (/var/lib/dpkg/), are you root? odoo@ACRVCRSERVER1:~$ sudo apt-get install postgresql [sudo] password for odoo: odoo is not in the sudoers file. This incident will be reported. odoo@ACRVCRSERVER1:~$ both way i was try but not successfully execute

you need to add odoo user in sudoers file. this will help you http://askubuntu.com/a/113416/85015.

Related Posts ตอบกลับ มุมมอง กิจกรรม
0
มิ.ย. 25
314
0
ม.ค. 25
1416
0
ม.ค. 25
1458
User Access Restriction by IP in Odoo แก้ไขแล้ว
1
ธ.ค. 24
1918
0
พ.ค. 24
1512