From owner-freebsd-isp@FreeBSD.ORG Thu Jul 6 20:41:25 2006 Return-Path: X-Original-To: freebsd-isp@freebsd.org Delivered-To: freebsd-isp@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3C1FE16A4DD for ; Thu, 6 Jul 2006 20:41:25 +0000 (UTC) (envelope-from b.candler@pobox.com) Received: from proof.pobox.com (proof.pobox.com [207.106.133.28]) by mx1.FreeBSD.org (Postfix) with ESMTP id B833943D45 for ; Thu, 6 Jul 2006 20:41:24 +0000 (GMT) (envelope-from b.candler@pobox.com) Received: from proof (localhost [127.0.0.1]) by proof.pobox.com (Postfix) with ESMTP id 0D9142B3AD; Thu, 6 Jul 2006 16:41:23 -0400 (EDT) Received: from mappit.local.linnet.org (212-74-113-67.static.dsl.as9105.com [212.74.113.67]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by proof.sasl.smtp.pobox.com (Postfix) with ESMTP id BFBA362074; Thu, 6 Jul 2006 16:41:21 -0400 (EDT) Received: from brian by mappit.local.linnet.org with local (Exim 4.61 (FreeBSD)) (envelope-from ) id 1Fyaf1-0008l1-Tz; Thu, 06 Jul 2006 21:41:20 +0100 Date: Thu, 6 Jul 2006 21:41:19 +0100 From: Brian Candler To: Keith Woodworth Message-ID: <20060706204119.GA33559@uk.tiscali.com> References: <20060705172226.I72183@pop.citytel.net> <20060706121716.GA32208@uk.tiscali.com> <20060706092851.D50369@pop.citytel.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20060706092851.D50369@pop.citytel.net> User-Agent: Mutt/1.4.2.1i Cc: freebsd-isp@freebsd.org Subject: Re: DHCP error. X-BeenThere: freebsd-isp@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Internet Services Providers List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 06 Jul 2006 20:41:25 -0000 On Thu, Jul 06, 2006 at 09:42:29AM -0700, Keith Woodworth wrote: > It used to be that you could put: > > /usr/sbin/dhcpd > > or any other command line to start a daemon in rc.conf, and there used to > be rc.local to start local daemons too years ago and I am still used to > putting the whole path, including command line args directly in rc.conf. > > Now /usr/libexec/save-entropy runs from cron every 11 mins running as > operator, which has no root privs and it reads in rc.conf. > > So I think what it does is when /usr/libexec/save-entropy runs it > reads in rc.conf and sees: > > /usr/sbin/dhcpd > > then tries to run it as operator. Operator has no root privs, hence the > error. Ah. That would certainly explain it :-) /etc/rc.local does still exists though (well, you need to create it yourself, but if you do it is run at system startup time) In the new world order, for isc-dhcpd installed from packages, all you do is dhcpd_enable="YES" in rc.conf. All the scripts in /usr/local/etc/rc.d/* are run at bootup time, but they only start the daemon if they have a corresponding foo_enable="YES" in rc.conf. (Or _should_ ... maybe not all scripts have been converted over yet) > /usr/libexec/save-entropy has something to do with generating randomness, > I'm not exactly sure as Ive not read up on it yet and there is no manpage. It's just a shell script - you can read it. It saves state from the entropy gathering, so if the machine is rebooted it the random number generator doesn't start up in a predictable state. > I suppose I could just comment that line in cron but I'm not sure what > else it might break, nor do I want to as it was put there for a reason I'm > sure. :) Other things run from cron, and you don't want those attempting to start dhcpd as different users either. The solution is to move your "/usr/sbin/dhcpd" command to /etc/rc.local > So now I have to invoke the daemons properly with: > > dhcpd_enable="yes" > > in rc.conf. Yes if you are using ports, which have startup scripts in /usr/local/etc/rc.d/. However if you are using isc-dhcpd compiled from source, then rc.local is probably the right place, unless you put a suitable script in /usr/local/etc/rc.d/ But this still doesn't explain the "permission denied" error you see if you start dhcpd as root (assuming you *are* trying to start it as root, that is) Regards, Brian.