From owner-freebsd-questions Fri Oct 26 14:20:40 2001 Delivered-To: freebsd-questions@freebsd.org Received: from wopr.caltech.edu (wopr.caltech.edu [131.215.102.114]) by hub.freebsd.org (Postfix) with ESMTP id 5195337B496 for ; Fri, 26 Oct 2001 14:20:35 -0700 (PDT) Received: (from mph@localhost) by wopr.caltech.edu (8.11.6/8.9.3) id f9QLJC668888; Fri, 26 Oct 2001 14:19:12 -0700 (PDT) (envelope-from mph) Date: Fri, 26 Oct 2001 14:19:12 -0700 From: Matthew Hunt To: Michael Grant Cc: David Kirchner , freebsd-questions@FreeBSD.ORG Subject: Re: running a program as nobody Message-ID: <20011026141912.A68648@wopr.caltech.edu> References: <200110262113.WAA21068@splat.grant.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <200110262113.WAA21068@splat.grant.org>; from mg-fbsd2@grant.org on Fri, Oct 26, 2001 at 10:13:56PM +0100 Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG 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 * 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