Date: Fri, 26 Oct 2001 14:19:12 -0700 From: Matthew Hunt <mph@astro.caltech.edu> To: Michael Grant <mg-fbsd2@grant.org> Cc: David Kirchner <davidk@accretivetg.com>, freebsd-questions@FreeBSD.ORG Subject: Re: running a program as nobody Message-ID: <20011026141912.A68648@wopr.caltech.edu> In-Reply-To: <200110262113.WAA21068@splat.grant.org>; from mg-fbsd2@grant.org on Fri, Oct 26, 2001 at 10:13:56PM %2B0100 References: <200110262113.WAA21068@splat.grant.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, Oct 26, 2001 at 10:13:56PM +0100, Michael Grant wrote: > > chroot /new/root su nobody -c /path/to/command/relative/to/new/root > Thanks, that appears to work, so the man page for su appears to be > wrong: > > su [-] [-Kflm] [-c class] [login [args]] Unless I misunderstand you, the man page is not wrong. The "-c" that you see above is part of the "args" component of the su command line, and is passed to the shell. That is, you want su to run sh -c /usr/local/bin/food rather than sh /usr/local/bin/food (or whatever your shell is; see its man page for the meaning of -c). I think the "EXAMPLES" section of "man su" does a reasonable job of making the distinction clear. -- Matthew Hunt <mph@astro.caltech.edu> * UNIX is a lever for the http://www.pobox.com/~mph/ * intellect. -J.R. Mashey 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?20011026141912.A68648>