From owner-freebsd-questions Fri Nov 6 04:06:16 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id EAA21127 for freebsd-questions-outgoing; Fri, 6 Nov 1998 04:06:16 -0800 (PST) (envelope-from owner-freebsd-questions@FreeBSD.ORG) Received: from smtp1.globalserve.net (smtp1.globalserve.net [209.90.144.2]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id EAA21121 for ; Fri, 6 Nov 1998 04:06:13 -0800 (PST) (envelope-from geoffr@globalserve.net) Received: from globalserve.net (dialin583.toronto.globalserve.net [209.90.132.74]) by smtp1.globalserve.net (8.9.1/8.9.1) with ESMTP id HAA07063; Fri, 6 Nov 1998 07:01:56 -0500 (EST) (envelope-from geoffr@globalserve.net) Message-ID: <3642E337.CA857323@globalserve.net> Date: Fri, 06 Nov 1998 06:53:27 -0500 From: Geoffrey Robinson X-Mailer: Mozilla 4.03 [en] (Win95; U) MIME-Version: 1.0 To: "Christopher J. Michaels" CC: questions@FreeBSD.ORG Subject: Re: Executing a process as another user References: <01BE08FB.2A8DC460.cjm2@earthling.net> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG 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? Yes, root# su username -c "command" will execute command as user username. If you are not running as root it will still work but will prompt you to enter the password for username. -- Geoffrey Robinson geoffr@globalserve.net Oakville, Ontario, Canada. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message