I verified that sendmail as well as printf and they are both there and
located at the specified paths mentioned.  I was looking through the
send_mail.pl script and could not find where these two apps are called
as well as uuencode and the date command.  I had assumed that
send_mail.pl was a replacement for sendmail and printf by reading the
documentation.  By reading the script I don't see anything to edit.


Thanks again for all your input.  

Jon


-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Marc
Powell
Sent: Thursday, July 17, 2008 12:24 PM
To: nagios Mailinglist
Subject: Re: [Nagios-users] Help - I am unable to get theNSClient++to
restart services


On Jul 17, 2008, at 2:06 PM, Jonathan Williams wrote:

> That is my guess as well, but the user Nagios is the owner of the  
> file.

Ownership doesn't matter at all except in very special circumstances  
(suid bit is set).
> \
> Warning: Attempting to execute the command
> "/usr/local/nagios/libexec/send_mail.pl - n "Service Problem" -h
> "jwilliamspc" -s "Critical"... (all the parameters are correct)...
> [EMAIL PROTECTED] resulted in a return code of 126.  Make
> sure the script or binary you are trying to execute actually exists...
>
> I did some searching on error code 126 and the issue was permission,  
> but
> if Nagios is the owner how could that be?

126 means that the program you are trying to execute doesn't exist.  
Looking at the script, send_mail.pl is just a fancy wrapper for /usr/ 
sbin/sendmail. It also calls /usr/bin/printf, uuencode (no specific  
path referenced), and the date command (again, no path referenced).  
All of those programs must exist in the paths specified or your should  
change the paths in the script. send_mail.pl must also exist in /usr/ 
local/nagios/libexec.  I would also modify the script to explicitly  
include the path to uuencode and date. When nagios executes the  
script, most of the $ENVIRONMENT variables don't exist or are  
different than when executed manually, including $PATH.

--
Marc

------------------------------------------------------------------------
-
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@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

-------------------------------------------------------------------------
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@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

Reply via email to