[Nagiosplug-devel] error on freebsd 6.0

Andreas Ericsson ae at op5.se
Mon Sep 11 13:49:20 CEST 2006

?????? ?????????? wrote:
> uname -a
> FreeBSD freeNAGIOS 6.0-RELEASE FreeBSD 6.0-RELEASE #0: Thu Nov  3 09:36:13 UTC 2005     root at x64.samsco.home:/usr/obj/usr/src/sys/GENERIC  i386
> # ./check_dhcp
> Error: Could not bind to DHCP socket (port 68)!  Check your privileges...

check_dhcp needs to bind a socket to a port in the privileged range 
(1-1024). In order to do this, it must be run as root. To set it to 
always run as root, you can do the following (also as root)

chown root:root check_dhcp
chmod 4755 check_dhcp

Note that there are other trickeries which one can resort to in order to 
let a single process execute certain commands as root, and yet others to 
allow programs running as arbitrary users to bind ports in the 
privileged range. Such trickery generally provides a better security but 
are also more cumbersome to set up. Google probably provides ample 
resources on how to implement such a solution for your particular system 
should you prefer not to take the actions posted above.

Andreas Ericsson                   andreas.ericsson at op5.se
OP5 AB                             www.op5.se
Tel: +46 8-230225                  Fax: +46 8-230231

More information about the Devel mailing list