From owner-freebsd-questions Fri Nov 6 06:54:47 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id GAA07541 for freebsd-questions-outgoing; Fri, 6 Nov 1998 06:54:47 -0800 (PST) (envelope-from owner-freebsd-questions@FreeBSD.ORG) Received: from militzer.me.tuns.ca (militzer.me.TUNS.Ca [134.190.50.153]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id GAA07530 for ; Fri, 6 Nov 1998 06:54:40 -0800 (PST) (envelope-from bemfica@militzer.me.tuns.ca) Received: from localhost (bemfica@localhost) by militzer.me.tuns.ca (8.8.8/8.8.5) with SMTP id KAA04763; Fri, 6 Nov 1998 10:40:30 -0400 (AST) Date: Fri, 6 Nov 1998 10:40:30 -0400 (AST) From: Antonio Bemfica To: "Christopher J. Michaels" cc: "FreeBSD Questions (E-mail)" Subject: Re: Executing a process as another user In-Reply-To: <01BE08FB.2A8DC460.cjm2@earthling.net> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Have a look at the EXAMPLES session of the su page: su -c staff man -c 'catman /usr/share/man /usr/local/man /usr/X11R6/man' Runs the command catman as user man, but the target command is run with the resource limits of the login class ``staff''. Note: in this example, the first -c option applies to su while the second is an argument to the shell being invoked. With the above switches, you don't actuall "su" to that user, you only *run* the command as the user. Hope this helps. Antonio On Thu, 5 Nov 1998, Christopher J. Michaels wrote: > Hey, Ok this may sound like a stupid question, but it's something I'd > like to know... > Is there a way to exec a process as a specific user, from root, > without su'ing to that user, setting the SUID flag on the executable, > or running it from cron? To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message