From owner-freebsd-questions@FreeBSD.ORG Thu Jan 6 15:57:11 2005 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 79FB216A4CE for ; Thu, 6 Jan 2005 15:57:11 +0000 (GMT) Received: from outside.taborandtashell.net (sub18-33.member.dsl-only.net [63.105.18.33]) by mx1.FreeBSD.org (Postfix) with ESMTP id B831043D3F for ; Thu, 6 Jan 2005 15:57:10 +0000 (GMT) (envelope-from tkelly-freebsd-questions@taborandtashell.net) Received: (qmail 36626 invoked from network); 6 Jan 2005 07:57:03 -0800 Received: from unknown (HELO ?192.168.0.9?) (tkelly@192.168.0.9) by 192.168.0.2 with AES256-SHA encrypted SMTP; 6 Jan 2005 07:57:03 -0800 Message-ID: <41DD5FC1.5050802@taborandtashell.net> Date: Thu, 06 Jan 2005 07:56:49 -0800 From: Tabor Kelly User-Agent: Mozilla Thunderbird 1.0 (X11/20041230) X-Accept-Language: en-us, en MIME-Version: 1.0 To: "J.D. Bronson" References: <6.2.0.14.2.20050106080413.00c43fe8@cheyenne.wixb.com> In-Reply-To: <6.2.0.14.2.20050106080413.00c43fe8@cheyenne.wixb.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit cc: freebsd-questions@freebsd.org Subject: Re: 5.3 - starting a process as a diff user X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: tkelly-freebsd-questions@taborandtashell.net List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 06 Jan 2005 15:57:11 -0000 J.D. Bronson wrote: > I have a daemon that I need to start at boot under > /usr/local/etc/rc.d > > and I need it to run as a specific user. > > Currently, from root, I su - {userid} and then launch it > and then log out. > > Can I make this automated in /usr/local/etc/rc.d and if so how? This is what I have in one line of my rc.local: su -m [user] -c '[command]' but check the man page first. -- Tabor Kelly tkelly-freebsd-questions@taborandtashell.net http://tabor.taborandtashell.net