Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Run Pandora as user "pandora"
#1
Hello,

how can i start PandoraFMS at boot with the User "pandora" and not with "root"?
 Reply
#2
Quote:Hello,

how can i start PandoraFMS at boot with the User "pandora" and not with "root"?

Just use "sudo" command, like:

sudo -u /etc/init.d/pandora_server start

But you cannot start network server without root privileges: network server needs privileges to make icmp request. You could run it, but cannot make ICMP checks with it. Could have more networks servers, and left only one with root privs to make ICMP checks.
 Reply
#3
Thank you for answer!

The sudo command is a good way to start the pandora from a console, but it`s not the solution of my problem.

The server starts without a graphical interface. At the boot up, i see the following lines:

It´s not a good idea running Pandora FMS Server as root user, please DON`T DO IT.
[ERROR] Cannot open configuration file at restart.
Please specify a valid Pandora FMS Home Directory in command line.

The configuration file is in the directory from the user "pandora".

Hoe can i start the Pandora Server on boot up with the user "pandora"?
 Reply
#4
The configuration file has to be in /etc/pandora/
 Reply
#5
Hi K44,

I'd use sudo as nil suggested. Simply edit the server start-up script (/etc/init.d/pandora_server for the data server) and replace the line that reads:

Quote:$PANDORA_DAEMON $PANDORA_HOME -D

With this one:

Quote:sudo -u pandora $PANDORA_DAEMON $PANDORA_HOME -D

Don't forget to check file permissions on /etc/pandora/ and /var/log/pandora.

Finally, if you changed the location of the configuration file pandora_server.conf change the value of $PANDORA_HOME accordingly.

Hope that helped :-)

Quote:Thank you for answer!

The sudo command is a good way to start the pandora from a console, but it`s not the solution of my problem.

The server starts without a graphical interface. At the boot up, i see the following lines:

It´s not a good idea running Pandora FMS Server as root user, please DON`T DO IT.
[ERROR] Cannot open configuration file at restart.
Please specify a valid Pandora FMS Home Directory in command line.

The configuration file is in the directory from the user "pandora".

Hoe can i start the Pandora Server on boot up with the user "pandora"?
 Reply
#6
Hello rnovoa,

i have edit the start up script and replaced the $PANDORA_DAEMON $PANDORA_HOME -D with sudo -u pandora $PANDORA_DAEMON $PANDORA_HOME -D.

At the boot up i become the following error:

sudo: sorry,you must have a tty to run sudo.
Cannot start Pandora FMS Data Server. Aborted.
 Reply
#7
Quote:Hello rnovoa,

i have edit the start up script and replaced the $PANDORA_DAEMON $PANDORA_HOME -D with sudo -u pandora $PANDORA_DAEMON $PANDORA_HOME -D.

At the boot up i become the following error:

sudo: sorry,you must have a tty to run sudo.
Cannot start Pandora FMS Data Server. Aborted.

As root exec:

# visudo

Search for "requiretty" and disabled it with # (or delete)

More information:

man sudoers

Good luck.
 Reply
#8
Hello nil,

thank you for help!

It works very fine! Big Grin
 Reply


Users browsing this thread: 1 Guest(s)


(c) 2006-2018 Artica Soluciones Tecnológicas. Contents of this wiki are under Create Common Attribution v3 licence. | pandorafms.com | pandorafms.org

Theme © MyBB Themes