check_dhcp

Jason Long jlong at messiah.edu
Tue Jul 8 01:59:56 CEST 2003


I think check_dhcp must be run as root (not the same thing as being owned by
root). You may want to make it setuid root, so that when nagios invokes it,
it executes as root.

I recommend making the permissions something like this:

-rwsr-x---  root   nagios            check_dhcp

This will let only members of the nagios group (including the nagios user)
run the program.

This can be accomplished with these commands:

# chown root check_dhcp
# chgrp nagios check_dhcp
# chmod u=rwxs,g=rx,o= check_dhcp


Jason Long




>>> JJ Asghar <jasghar at celitesystems.com> 07/07/03 16:11 PM >>>

I complied the check_dhcp.c file, with gcc as root so the owners are
root and the group is root. my checkcommands.cfg has the line

define command{
	command_name check_dhcp
	command_line $USER1$/check_dhcp -s $ARG1$ -r $ARG2$ -i eth0
	}

and the services.cfg file has  the command line

check_command		check_dhcp!10.1.1.3!10.1.1.189

but i seem so still get the "Error: Could not bind socket to interface
eth0. Check your privileges..."

But it's owned and controled by root.....i'm lost




-------------------------------------------------------
This SF.Net email sponsored by: Free pre-built ASP.NET sites including
Data Reports, E-commerce, Portals, and Forums are available now.
Download today and enter to win an XBOX or Visual Studio .NET.
http://aspnet.click-url.com/go/psa00100006ave/direct;at.asp_061203_01/01
_______________________________________________
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