startup daemon as unpriviliged user
matthew at netway.com
Fri Feb 13 17:09:44 PST 2004
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?
make a small sh script like so:
su username -c "command"
Example use on command line:
uid=0(root) gid=0(wheel) groups=0(wheel), 2(kmem), 3(sys), 4(tty),
5(operator), 20(staff), 31(guest)
krazykat# su matthew -c id
uid=1001(matthew) gid=1001(matthew) groups=1001(matthew), 0(wheel),
> Louis LeBlanc leblanc at keyslapper.org
> Fully Funded Hobbyist, KeySlapper Extrordinaire :)
> http://www.keyslapper.org Ô¿Ô¬
> The clearest way into the Universe is through a forest wilderness.
> -- John Muir
> freebsd-questions at freebsd.org mailing list
> To unsubscribe, send any mail to "freebsd-questions-unsubscribe at freebsd.org"
More information about the freebsd-questions