Odoo Help

Welcome!

This community 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.

0

Running as user 'root' is a security risk, aborting ?

By
Madura
on 9/23/14, 3:16 AM 3,690 views

This error is got when I try to  start the openerp-server using thia command : sudo ./openerp-server

Can anyone help me to resolve this?

Thank You.

3

Dhinesh - Technical Consultant, Sodexis Inc

--Dhinesh - Technical Consultant, Sodexis Inc--
3577
| 5 4 9
Pondicherry, India
--Dhinesh - Technical Consultant, Sodexis Inc--

Passionate coder in Python/OpenERP. Knows Django/Flask MVC frameworks. Did code in Java, PHP.

Contact me at: dvdhinesh.mail@gmail.com

Dhinesh - Technical Consultant, Sodexis Inc
On 9/23/14, 4:21 AM

Hi, No need to add sudo to run the openerp-server. Try running it from a normal user.
For security reasons, it doesnt allow you to proceed further and throws "Running as user 'root' is a security risk, aborting."
Try removing sudo from command (i.e) ./openerp-server

 

@Dhinesh thankx for the reply, I tried with " ./openerp-server " but no luck. getting this error, _____Traceback (most recent call last): File "./openerp-server", line 5, in openerp.cli.main() File "/home/zone/openerp-8.0-29e08a2/openerp/cli/__init__.py", line 71, in main o.run(args) File "/home/zone/openerp-8.0-29e08a2/openerp/cli/server.py", line 174, in run main(args) File "/home/zone/openerp-8.0-29e08a2/openerp/cli/server.py", line 139, in main openerp.tools.config.parse_config(args) File "/home/zone/openerp-8.0-29e08a2/openerp/tools/config.py", line 336, in parse_config openerp.netsvc.init_logger() File "/home/zone/openerp-8.0-29e08a2/openerp/netsvc.py", line 136, in init_logger resetlocale() File "/home/zone/openerp-8.0-29e08a2/openerp/tools/translate.py", line 1084, in resetlocale for ln in get_locales(): File "/home/zone/openerp-8.0-29e08a2/openerp/tools/translate.py", line 1052, in get_locales lang = locale.getdefaultlocale()[0] File "/usr/lib/python2.7/locale.py", line 543, in getdefaultlocale return _parse_localename(localename) File "/usr/lib/python2.7/locale.py", line 475, in _parse_localename raise ValueError, 'unknown locale: %s' % localename ValueError: unknown locale: UTF-8

Madura
on 9/23/14, 5:33 AM
2
Fabian Tribrunner
On 9/23/14, 3:45 AM

you should add a user ie "odoo" or  "openerp" to run the server

sudo adduser --system --home=/opt/odoo --group odoo

home ist the path of your odoo instalation.

sudo su - odoo -s /bin/bash
./openerp-server

another way could be, adding a init script. ie http://www.theopensourcerer.com/wp-content/uploads/2014/09/odoo-server

 

 

Thank You @Fabian, it helped me… :)

Madura
on 9/23/14, 5:44 AM
0

Atchuthan - Technical Consultant, Sodexis Inc

--Atchuthan - Technical Consultant, Sodexis Inc--
3883
| 5 3 8
Puducherry, India
--Atchuthan - Technical Consultant, Sodexis Inc--
Passionate coder in Python/Odoo(formerly known as OpenERP).

Contact me via GMail: atchuthantu@gmail.com via Skype: atchuthan_skype
via Linkedin: http://in.linkedin.com/in/atchuthantu
Atchuthan - Technical Consultant, Sodexis Inc
On 9/23/14, 3:52 AM

try to login with openerp user

su - openerp
and then try to start with it.

OR if you need to start the openerp from root

sudo /etc/init.d/openerp-server start

0
Mariusz Mizgier
On 9/23/14, 4:42 AM

If you really want to run openerp-server as a root for a development purpose, you might try to change function check_root_user, which is in server/openerp/cli/server.py file so that it returns True instead of sys.exit(1). But this should be used strictly in a development enviroment!

Your Answer

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

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

1 follower(s)

Stats

Asked: 9/23/14, 3:16 AM
Seen: 3690 times
Last updated: 3/16/15, 8:10 AM