From owner-freebsd-questions@FreeBSD.ORG Fri Feb 13 17:44:23 2004 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 616D116A4CE for ; Fri, 13 Feb 2004 17:44:23 -0800 (PST) Received: from out005.verizon.net (out005pub.verizon.net [206.46.170.143]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1E56143D2F for ; Fri, 13 Feb 2004 17:44:23 -0800 (PST) (envelope-from cswiger@mac.com) Received: from mac.com ([68.160.202.196]) by out005.verizon.net (InterMail vM.5.01.06.06 201-253-122-130-106-20030910) with ESMTP id <20040214014422.PXUK2677.out005.verizon.net@mac.com> for ; Fri, 13 Feb 2004 19:44:22 -0600 Message-ID: <402D7D68.9030303@mac.com> Date: Fri, 13 Feb 2004 20:44:08 -0500 From: Chuck Swiger Organization: The Courts of Chaos User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.6) Gecko/20040113 X-Accept-Language: en-us, en MIME-Version: 1.0 To: freebsd-questions@FreeBSD.org References: <20040214004739.GD650@keyslapper.org> In-Reply-To: <20040214004739.GD650@keyslapper.org> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Authentication-Info: Submitted using SMTP AUTH at out005.verizon.net from [68.160.202.196] at Fri, 13 Feb 2004 19:44:22 -0600 Subject: Re: startup daemon as unpriviliged user X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 14 Feb 2004 01:44:23 -0000 Louis LeBlanc wrote: > So, how can I get a process to run automatically on startup for an > unprivileged user? It's reasonable to create a fetchmail.sh script in /usr/local/etc/rc.d which does something like: #!/bin/sh USER = me COMMAND = /usr/local/bin/fetchmail... su - ${USER} -c ${COMMAND} In this case, however, you might want to invoke it from a per-user cron script eievery hour or so instead... -- -Chuck