[Nagiosplug-help] run a plugin with a command that you have to be a root
Marc Powell
marc at ena.com
Fri May 22 14:36:14 CEST 2009
On May 22, 2009, at 7:10 AM, Nikolaos Loutzakis wrote:
>
> i have made a plugin that run correct in the terminal. but in order
> to execute this command you have to
> be root. to have root privileges. but when i insert the plugin in
> the nagios web interface it executes it
> wrong because it runs it as not a root . how can i make it run as
> root?
Using sudo...
man sudoers
visudo --
nagios ALL=(ALL) NOPASSWD:/path/to/your/plugin
Make sure requiretty is commented out --
#Defaults requiretty
For your command definition --
define command {
...
command_line /path/to/sudo /path/to/your/plugin
}
--
Marc
More information about the Help
mailing list