xine

Mark Jarvis mark.jarvis at pvmail.maricopa.edu
Sat Feb 11 22:03:09 MST 2006


 > If you "su -", the environment is identical.
	Aaarrrggghhh! NO--the "su" and "su -" environments are NOT the same. 
Whether it's "su" or "su userid" the Substitute User command switches 
you to the appropriate userid--but you still retain basically the same 
environment that you already had. However, if you use "su -" or "su - 
userid", you not only switch, but go through all the steps of a normal 
logon to the new userid and pick up the new userid's environment. 
Notice: the "-" is actually an argument to the su command.

As a Unix SysAdmin, I stubbed my toe enough times when I didn't use the 
blasted "-" that I finally quit using plain "su" entirely.

While it may be that either "su" or "su -" will work in the situation in 
question, the linux environments are NOT identical.

-mj-

Dan Lund wrote:

> If you "su -", the environment is identical.
> 
> On 2/11/06, Technomage <technomage-hawke at cox.net> wrote:
> 
>>are you compiling as root or "su"?
>>
>>there is a difference in how the environment is laid out....
>>
>>perhaps this will help: export GCC=/usr/bin/gcc
>>
> 
> 
> 
> --
> To exercise power costs effort and demands courage. That is why so
> many fail to assert rights to which they are perfectly entitled -
> because a right is a kind of power but they are too lazy or too
> cowardly to exercise it.  The virtues which cloak these faults are
> called patience and forbearance.
> Friedrich Nietzsche
> ---------------------------------------------------
> PLUG-discuss mailing list - PLUG-discuss at lists.plug.phoenix.az.us
> To subscribe, unsubscribe, or to change  you mail settings:
> http://lists.PLUG.phoenix.az.us/mailman/listinfo/plug-discuss
> 
> 



More information about the PLUG-discuss mailing list