From owner-freebsd-questions@FreeBSD.ORG Fri Jan 19 23:29:35 2007 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 199D616A404 for ; Fri, 19 Jan 2007 23:29:35 +0000 (UTC) (envelope-from carpetsmoker@carpetsmoker.net) Received: from glitch.carpetsmoker.net (carpetsmoker.xs4all.nl [82.93.23.199]) by mx1.freebsd.org (Postfix) with ESMTP id C1D2F13C441 for ; Fri, 19 Jan 2007 23:29:34 +0000 (UTC) (envelope-from carpetsmoker@carpetsmoker.net) Received: from glitch.carpetsmoker.net (unknown [192.168.100.13]) by glitch.carpetsmoker.net (Postfix) with SMTP id 9B6D0B85E; Sat, 20 Jan 2007 00:03:32 +0100 (CET) Received: by glitch.carpetsmoker.net (sSMTP sendmail emulation); Sat, 20 Jan 2007 00:03:28 +0100 From: "Martin Tournoij" Date: Sat, 20 Jan 2007 00:03:28 +0100 To: freebsd-questions@freebsd.org Message-ID: <20070119230328.GA33379@phong.carpetsmoker.net> References: <6207f7d90701191429x4ce667afyf4cf53d9388c7381@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <6207f7d90701191429x4ce667afyf4cf53d9388c7381@mail.gmail.com> User-Agent: mutt-ng/devel-r804 (FreeBSD) Cc: don.munyak@gmail.com Subject: Re: startup script with non-root user 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, 19 Jan 2007 23:29:35 -0000 On Fri, Jan 19, 2007 at 05:30:00PM -0500, Don Munyak wrote: > Hello, > > I have an application I'd like to startup at boot, however, the script > needs to be started by a non-user account. > > If I put the startup script in /usr/local/etc/rc.d/hobbit.sh > > How do I get it to start using the user account 'hobbit' > > Thanks > _______________________________________________ > freebsd-questions@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-questions > To unsubscribe, send any mail to "freebsd-questions-unsubscribe@freebsd.org" -- But like the Good Book says... There's BIGGER DEALS to come! You can use su, a very simple example: script.sh: su carpetsmoker startup.sh startup.sh: echo "Hello, I am now running as user "carpetsmoker" set See the su man page for more information Hope this helps. Martin