[Nagiosplug-help] run a plugin with a command that you have to be a root

Nikolaos Loutzakis el04748 at mail.ntua.gr
Fri May 22 15:25:58 CEST 2009


thank you . that worked. 


Marc Powell <marc at ena.com> said:

> 
> 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
> 
> 
> ---------------------------------------------------------------------------
---
> Register Now for Creativity and Technology (CaT), June 3rd, NYC. CaT
> is a gathering of tech-side developers & brand creativity professionals. Meet
> the minds behind Google Creative Lab, Visual Complexity, Processing, & 
> iPhoneDevCamp asthey present alongside digital heavyweights like Barbarian
> Group, R/GA, & Big Spaceship. http://www.creativitycat.com 
> _______________________________________________
> Nagiosplug-help mailing list
> Nagiosplug-help at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/nagiosplug-help
> ::: Please include plugins version (-v) and OS when reporting any issue. 
> ::: Messages without supporting info will risk being sent to /dev/null
> 



-- 








More information about the Help mailing list