puzzling no output from nrpe run of check_load

David Harbaugh dlh at cayuga-cc.edu
Fri Apr 27 18:22:56 CEST 2012


'su -' makes the shell a login shell ... which requires a real shell, not /bin/false.

What if you do this?

sudo su nagios more /proc/loadavg

Skip the -, which should run more directly, which should work even with /bin/false listed as the shell.

If that works, then you should be able to modify your nagios command definition the same way ...


-----Original Message-----
From: Peter N. Steinmetz [mailto:PeterNSteinmetz at steinmetz.org] 
Sent: Wednesday, April 25, 2012 12:42 PM
To: Nagios Users List
Subject: Re: [Nagios-users] puzzling no output from nrpe run of check_load

Yes, ls -l /proc/loadavg shows:

-r--r--r--  1 root       root

which I believe mean any user can read it. 

Yet, 
sudo su - nagios more /proc/loadavg
returns nothing when the nagios user has /bin/false for a shell, and returns the expected output when the nagios user has /bin/bash for a shell.

I added the following line to /etc/sudoers:
nagios ALL=(ALL) NOPASSWD: /proc/loadavg
but that doesn't fix the problem.

thanks,
Peter

On Apr 25, 2012, at 9:09 AM, Alex Griffin wrote:

> Does the nagios user have read access to /proc/loadavg?
> 
> Alex Griffin
> ---
> Tech Team
> agriffin at nagios.com
> 


------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Nagios-users mailing list
Nagios-users at 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

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Nagios-users mailing list
Nagios-users at 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





More information about the Users mailing list