nagios的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 (chmod +s yourpluginfile)
# su nagios
$ ./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...
$ exit
exit
# chmod u+s check_dhcp
# ./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...
# ls -lah check_dhcp
-rwsrwxr-x 1 nagios nagios 76K 2008-09-19 18:01 check_dhcp
# chown root:root check_dhcp
# ./check_dhcp
OK: Received 1 DHCPOFFER(s), max lease time = 0 sec.
页:
[1]