LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 05-03-2013, 06:59 AM   #1
glennbtn
Member
 
Registered: Dec 2009
Posts: 151

Rep: Reputation: 18
Sudoers issue


Hi All

I have added a file to sudoers using visudo so that a plugin can be run.

nagios All=(ALL) NOPASSWD: /usr/local/nagios/libexec/check_md_raid

When the plug in called remotely from nagios the returned result is

UNKNOWN: You must be root to run this plugin

Can anyone help here please

Thanks

Glenn
 
Old 05-03-2013, 07:34 AM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
it sounds like you're not actually using sudo in the command.

You should be running these commands under sudo though. if you REALLY need to, then you should actually update the script and run the specific command in the script to use sudo. That way you don't need to embed the sudo optiosn in your nagios config files either.
 
Old 05-03-2013, 07:51 AM   #3
sundialsvcs
LQ Guru
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 10,610
Blog Entries: 4

Rep: Reputation: 3905Reputation: 3905Reputation: 3905Reputation: 3905Reputation: 3905Reputation: 3905Reputation: 3905Reputation: 3905Reputation: 3905Reputation: 3905Reputation: 3905
Urgh. The thought of running a Sudo-level command through Nagios stinks to me.
 
Old 05-03-2013, 07:58 AM   #4
glennbtn
Member
 
Registered: Dec 2009
Posts: 151

Original Poster
Rep: Reputation: 18
Thanks for the reply

So how would I add this in the nrpe.cfg file as I can't seem to get it to work. My original command was

command[check_md_raid]=/usr/local/nagios/libexec/check_md_raid

Thanks

Glenn
 
Old 05-04-2013, 01:47 AM   #5
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
Quote:
Originally Posted by sundialsvcs View Post
Urgh. The thought of running Nagios stinks to me.
Fixed that for you

---------- Post added 04-05-13 at 07:48 AM ----------

Quote:
Originally Posted by glennbtn View Post
Thanks for the reply

So how would I add this in the nrpe.cfg file as I can't seem to get it to work. My original command was

command[check_md_raid]=/usr/local/nagios/libexec/check_md_raid

Thanks

Glenn
don't change that. change the check_md_raid script itself.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] User not in sudoers: How to add user? Permtion Denied for sudoers file esgol Linux - Newbie 3 07-13-2012 07:44 AM
Fedora /etc/sudoers file and sudoers.d directory davejjj Linux - Newbie 2 10-21-2011 06:19 PM
sudo(/etc/sudoers) issue knockout_artist Linux - Newbie 2 03-24-2009 04:39 PM
I deleted /etc/sudoers and creates a new file call sudoers but now it doesnt for visu abefroman Linux - Software 1 11-10-2005 05:03 PM
sudoers???? yenonn Slackware 6 02-10-2004 03:09 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 10:54 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration