strange problem with check_dhcp
Seth Simmons
ssimmons at cymfony.com
Mon Sep 22 18:30:44 CEST 2008
Last week I moved Nagios to a new box and after a little tweaking got
the old config files working. The only thing that isn't working is
check_dhcp.
Since I moved it check_dhcp has been returning unknown with the details
as "this plug-in must be run as root or setuid root....could not bind
socket to Ethernet interface eth0. Check your privileges..."
If I do the check manually as root it works; manually as Nagios returns
that error. I read a couple posts that say to do chmod u+s or chmod +s
on check_dhcp. When I do that I now get that same error both as Nagios
and as root. I did chmod 775 on it and it again works for root but same
error for Nagios. Also tried changing ownership from Nagios to root.
All other plugins working fine. Any ideas? Probably something stupid
I'm missing.
[root at nagios libexec]# ./check_dhcp
OK: Received 1 DHCPOFFER(s), max lease time = 0 sec.
[root at nagios libexec]# su nagios
[nagios at nagios libexec]$ ./check_dhcp
Warning: This plugin must be either run as root or setuid root.
To run as root, you can use a tool like sudo.
To set the setuid permissions, use the command:
chmod u+s yourpluginfile
Error: Could not bind socket to interface eth0. Check your
privileges...
[nagios at nagios libexec]$ exit
exit
[root at nagios libexec]# chmod u+s check_dhcp
[root at nagios libexec]# ./check_dhcp
Warning: This plugin must be either run as root or setuid root.
To run as root, you can use a tool like sudo.
To set the setuid permissions, use the command:
chmod u+s yourpluginfile
Error: Could not bind socket to interface eth0. Check your
privileges...
[root at nagios libexec]# ls -lah check_dhcp
-rwsrwxr-x 1 nagios nagios 76K 2008-09-19 18:01 check_dhcp
[root at nagios libexec]# chown root:root check_dhcp
[root at nagios libexec]# ./check_dhcp
OK: Received 1 DHCPOFFER(s), max lease time = 0 sec.
[root at nagios libexec]# su nagios
[nagios at nagios libexec]$ ./check_dhcp
Warning: This plugin must be either run as root or setuid root.
To run as root, you can use a tool like sudo.
To set the setuid permissions, use the command:
chmod u+s yourpluginfile
Error: Could not bind socket to interface eth0. Check your
privileges...
Nagios 3.0.3/plugins 1.4.12/fedora 9
-------------------------------------------------------------------------
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