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