Adding these two lines to /etc/sudoers will help you (stolen from the adagios rpm package):
# Allow nagios user to restart the nagios service Defaults:nagios !requiretty nagios ALL = (root) NOPASSWD: /etc/init.d/nagios ----- Original Message ----- From: "Jim Avery" <j...@jimavery.me.uk> To: "nagios List" <nagios-users@lists.sourceforge.net> Sent: Friday, August 2, 2013 11:39:27 AM Subject: Re: [Nagios-users] how to start nagios with non nagios user On 31 Jul 2013 14:30, ", Roy" < rp...@njit.edu > wrote: > > Hi guys, > > I want to start nagios with non root, nagios user. How do I do that. Something like.. sudo /etc/init.d/nagios start should do it. You'll need to edit /etc/sudoers to allow your non-root user to do this. Enter 'man sudoers' to read all the gory detail on how to configure it. However... If your system is anything like mine (Ubuntu), you'll find you can easily give users sudo access to run any command as root by adding them to the 'admin' group. This is by virtue of this entry in /etc/sudoers: # Members of the admin group may gain root privileges %admin ALL=(ALL) ALL Although you might decide this gives them too much power... I hope that helps. Jim ------------------------------------------------------------------------------ Get your SQL database under version control now! Version control is standard for application code, but databases havent caught up. So what steps can you take to put your SQL databases under version control? Why should you start doing it? Read more to find out. http://pubads.g.doubleclick.net/gampad/clk?id=49501711&iu=/4140/ostg.clktrk _______________________________________________ Nagios-users mailing list Nagios-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/nagios-users ::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. ::: Messages without supporting info will risk being sent to /dev/null ------------------------------------------------------------------------------ Get your SQL database under version control now! Version control is standard for application code, but databases havent caught up. So what steps can you take to put your SQL databases under version control? Why should you start doing it? Read more to find out. http://pubads.g.doubleclick.net/gampad/clk?id=49501711&iu=/4140/ostg.clktrk _______________________________________________ Nagios-users mailing list Nagios-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/nagios-users ::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. ::: Messages without supporting info will risk being sent to /dev/null