Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 6 Nov 1998 10:40:30 -0400 (AST)
From:      Antonio Bemfica <bemfica@militzer.me.tuns.ca>
To:        "Christopher J. Michaels" <cjm2@earthling.net>
Cc:        "FreeBSD Questions (E-mail)" <freebsd-questions@FreeBSD.ORG>
Subject:   Re: Executing a process as another user
Message-ID:  <Pine.BSF.3.96.981106103650.4642A-100000@militzer.me.tuns.ca>
In-Reply-To: <01BE08FB.2A8DC460.cjm2@earthling.net>

next in thread | previous in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.3.96.981106103650.4642A-100000>