Welcome to Pandora FMS Community!

Find answers, ask questions, and connect with our community around the world.

Welcome to Pandora FMS Community Forums Community support Run Pandora as user “pandora”

  • Run Pandora as user “pandora”

    Posted by K44 on April 15, 2008 at 17:48

    Hello,

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

    K44 replied 16 years, 10 months ago 4 Members · 7 Replies
  • 7 Replies
  • Sancho

    Administrator
    April 17, 2008 at 00:34
    2321 Karma points
    Community awards: bulb Bright ideas
    Community rank: tentacle_master_icon Tentacle Master
    Like it
    Up
    0
    Down
    Drop it
    ::

    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.

  • K44

    Member
    April 18, 2008 at 12:40
    0 Karma points
    Community rank: tentacle-noob-1 Tentacle noob
    Like it
    Up
    0
    Down
    Drop it
    ::

    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”?

  • manu

    Member
    April 18, 2008 at 13:47
    0 Karma points
    Community rank: tentacle-noob-1 Tentacle noob
    Like it
    Up
    0
    Down
    Drop it
    ::

    The configuration file has to be in /etc/pandora/

  • rnovoa

    Member
    April 18, 2008 at 18:09
    0 Karma points
    Community rank: tentacle-noob-1 Tentacle noob
    Like it
    Up
    0
    Down
    Drop it
    ::

    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:

    $PANDORA_DAEMON $PANDORA_HOME -D

    With this one:

    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 🙂

    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”?

  • K44

    Member
    April 21, 2008 at 13:01
    0 Karma points
    Community rank: tentacle-noob-1 Tentacle noob
    Like it
    Up
    0
    Down
    Drop it
    ::

    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.

  • Sancho

    Administrator
    April 21, 2008 at 13:21
    2321 Karma points
    Community awards: bulb Bright ideas
    Community rank: tentacle_master_icon Tentacle Master
    Like it
    Up
    0
    Down
    Drop it
    ::

    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.

  • K44

    Member
    April 23, 2008 at 20:20
    0 Karma points
    Community rank: tentacle-noob-1 Tentacle noob
    Like it
    Up
    0
    Down
    Drop it
    ::

    Hello nil,

    thank you for help!

    It works very fine! 😀