Date: Fri, 26 Oct 2001 14:01:39 -0700 (PDT) From: David Kirchner <davidk@accretivetg.com> To: Michael Grant <mg-fbsd2@grant.org> Cc: <freebsd-questions@FreeBSD.ORG> Subject: Re: running a program as nobody Message-ID: <20011026140025.U25870-100000@localhost> In-Reply-To: <200110262059.VAA21039@splat.grant.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, 26 Oct 2001, Michael Grant wrote: > I want to run a particular daemon as userid nobody. I tried the > obvious thing of using su like this: > > su -c nobody nobody /usr/local/bin/food > > but no matter what I try, I cannot get something like this to work. > > Is there some standard way to do this other than writing a C program > wrapper myself? I see something called "jail" but that seems a bit > heafty, it looks like I would have to install a complete version of > freebsd in some directory practically creating a virtual machine. > > Surely there must be some simple way to do run a program as nobody, > maybe chrooted as well? The format would be: su nobody -c /path/to/command If you want it chroot'd I think you're safe doing: chroot /new/root su nobody -c /path/to/command/relative/to/new/root I believe you'd need "su" in your /new/root, too. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20011026140025.U25870-100000>