From owner-freebsd-questions Fri Oct 26 14:16: 1 2001 Delivered-To: freebsd-questions@freebsd.org Received: from webs1.accretive-networks.net (webs1.accretive-networks.net [207.246.154.13]) by hub.freebsd.org (Postfix) with ESMTP id 23F3B37B409 for ; Fri, 26 Oct 2001 14:15:59 -0700 (PDT) Received: from localhost (davidk@localhost) by webs1.accretive-networks.net (8.11.1/8.11.3) with ESMTP id f9QLFvP28244; Fri, 26 Oct 2001 14:15:57 -0700 (PDT) Date: Fri, 26 Oct 2001 14:15:57 -0700 (PDT) From: David Kirchner X-X-Sender: To: Michael Grant Cc: Subject: Re: running a program as nobody In-Reply-To: <200110262113.WAA21068@splat.grant.org> Message-ID: <20011026141508.M25870-100000@localhost> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII 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, 26 Oct 2001, Michael Grant wrote: > > 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. > > Thanks, that appears to work, so the man page for su appears to be > wrong: > > su [-] [-Kflm] [-c class] [login [args]] Actually it's correct - it's a bit confusing about it though, I'll agree. :-) The -c you're passing after the login (nobody) is actually being sent to /bin/sh, which tells /bin/sh to process it as if it were something typed in to sh, rather than as if it were a shell script. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message