nrpe and check_mailq

Kevin Freels kfreels at sendmail.com
Tue Aug 26 00:16:48 CEST 2008


Okay, I started to go down the sudo path until I realized I have other
systems that check_mailq works just fine on without having to be root.
The difference is that the system it works on is a FreeBSD and the
system  that's choking is Linux.

check_mailq on the working system is running as the same user ('nagios')
as the Linux box, so neither of them are root. The perms/owners for
check_mailq are the same for both systems.

*AND* I can run check_mailq on the FreeBSD box as a mortal user (me),
but not on the Linux box. I did notice that version of Perl on the Linux
box is 5.8.0, while the working FreeBSD is 5.005. Perl on the FreeBSD is
also chgrp'd to wheel, not root.

Maybe somewhere in there lies the culprit?

I'm also not comfortable adding a generic user ('nagios') to sudo. I
realize I can restrict the commands the user can use, but still....

BTW, thanks for the replies!!!!

....k
-=-=-=-  

> > If I remember correctly, you need to be root to run mailq on most 
> > systems so you might need to give the nrpe user sudo access for it.
> 
> Yup, most likely permissions problem.
> 
> The easiest way to fix that is by adding it to sudo (nrpe 
> would call "sudo /usr/local/nagios/libexec/check_mailq  -w 
> 300 -c 500"). Make sure it does not have the requiretty 
> option or it will still fail from the daemon.
> 
> - --
> Thomas

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
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