From owner-freebsd-questions@FreeBSD.ORG Fri Nov 30 10:02:51 2007 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BFB2F16A417 for ; Fri, 30 Nov 2007 10:02:51 +0000 (UTC) (envelope-from rihad@mail.ru) Received: from mx28.mail.ru (mx28.mail.ru [194.67.23.67]) by mx1.freebsd.org (Postfix) with ESMTP id 3F79513C474 for ; Fri, 30 Nov 2007 10:02:51 +0000 (UTC) (envelope-from rihad@mail.ru) Received: from mx33.mail.ru (mx33.mail.ru [194.67.23.194]) by mx28.mail.ru (mPOP.Fallback_MX) with ESMTP id 671C2B167C for ; Fri, 30 Nov 2007 12:31:43 +0300 (MSK) Received: from [217.25.23.15] (port=19199 helo=[217.25.23.15]) by mx33.mail.ru with esmtp id 1Iy2Dl-000Fus-00 for freebsd-questions@freebsd.org; Fri, 30 Nov 2007 12:31:41 +0300 Message-ID: <474FD878.5020801@mail.ru> Date: Fri, 30 Nov 2007 13:31:36 +0400 From: rihad User-Agent: Icedove 1.5.0.14pre (X11/20071018) MIME-Version: 1.0 To: freebsd-questions@freebsd.org Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: running port as non-root X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Nov 2007 10:02:51 -0000 Hi, I'm trying to run the net/openradius port as non-root by first changing /usr/local/etc/rc.d/openradius: . /etc/rc.subr name="openradius" rcvar=`set_rcvar` load_rc_config ${name} : ${openradius_enable="NO"} : ${openradius_flags="-o /var/log/openradius.log"} -command=/usr/local/sbin/radiusd +command=/usr/local/bin/sudo +flags="-u radius /usr/local/sbin/radiusd" run_rc_command "$1" (Lines marked with -/+ were removed/added by me, respectively). Then I add the radius user, allow it to run without sudo's asking for the password, and finally start the thing up: # pw useradd radius -d /nonexistent -s /usr/sbin/nologin # visudo # ... do the necessary chown/chmod on openradius logs/dictionaries ... # /usr/local/etc/rc.d/openradius start All fine so far: everything starts up fine and runs. The problem starts here: # /usr/local/etc/rc.d/openradius stop openradius not running? # ps -auxww | fgrep radiusd radius 89300 0.0 0.0 3756 1588 ?? Is 10:56AM 0:00.00 /usr/local/sbin/radiusd ... any built-in way to make "stop" work, without changing rc.d/ too much? Thanks.