From owner-freebsd-questions@FreeBSD.ORG Fri Feb 13 17:09:44 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 995FA16A4CE for ; Fri, 13 Feb 2004 17:09:44 -0800 (PST) Received: from smtp-2.mdc.net (smtp-2.mdc.net [209.251.64.26]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2771143D1F for ; Fri, 13 Feb 2004 17:09:44 -0800 (PST) (envelope-from matthew@netway.com) Received: from admin1.mdc.net (admin1.mdc.net [209.251.64.23]) by smtp-2.mdc.net (8.9.3/8.9.1) with ESMTP id UAA59211 for ; Fri, 13 Feb 2004 20:09:40 -0500 (EST) (envelope-from matthew@netway.com) Date: Fri, 13 Feb 2004 20:09:35 -0500 (EST) From: matthew X-X-Sender: matthew@admin1.mdc.net To: FreeBSD Questions In-Reply-To: <20040214004739.GD650@keyslapper.org> Message-ID: <20040213200721.F67547@admin1.mdc.net> References: <20040214004739.GD650@keyslapper.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=iso-8859-1 Content-Transfer-Encoding: QUOTED-PRINTABLE 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:09:44 -0000 On Fri, 13 Feb 2004, Louis LeBlanc wrote: > Hey everyone. Here's a general question for you. > > I have a FreeBSD 4.8 system that runs fetchmail for me as an > unprivileged everyday userid. The problem is that the machine isn't > on the most reliable powergrid one could hope for. > > So when the system comes back up after going down, I ALWAYS forget > that I have to get fetchmail restarted. If I forget for too long, > there's so much mail it blows the server that receives the mail into > oblivion (also FreeBSD 4.8, running Sendmail, Cyrus Imapd, and the > main culprit, Spamassassin - spamd). This is so bad that I often have > to reboot the receiving system. > > So, how can I get a process to run automatically on startup for an > unprivileged user? > cd /usr/local/etc/rc.d make a small sh script like so: #!/bin/sh su username -c "command" Example use on command line: krazykat# id uid=3D0(root) gid=3D0(wheel) groups=3D0(wheel), 2(kmem), 3(sys), 4(tty), 5(operator), 20(staff), 31(guest) krazykat# su matthew -c id uid=3D1001(matthew) gid=3D1001(matthew) groups=3D1001(matthew), 0(wheel), 69(network) krazykat# l8r, m > Thanks. > Lou > -- > Louis LeBlanc leblanc@keyslapper.org > Fully Funded Hobbyist, KeySlapper Extrordinaire :) > http://www.keyslapper.org =D4=BF=D4=AC > > The clearest way into the Universe is through a forest wilderness. > -- John Muir > _______________________________________________ > freebsd-questions@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-questions > To unsubscribe, send any mail to "freebsd-questions-unsubscribe@freebsd.o= rg" >