Why use "su -" rather than "su"

Mike McCarty mike.mccarty at sbcglobal.net
Fri Jul 15 16:06:12 UTC 2005


Paul Howarth wrote:

> Mike McCarty wrote:
>
>>>
>> I have a general *NIX admin question. Why does one want to use
>> su -
>> as opposed to just su? I think I understand the difference in regards
>> to "su -" actually changes you to root, as if logged in that way, as
>> opposed to simply granting root privilege. But why do that? If I do
>> that, then I lose my path settings, and can't run my normal editor, 
>> which
>> is in ~/bin and so on. I just use "su".
>>
>> What am I missing?
>
>
> You're missing getting /sbin and /usr/sbin on your PATH, which you 
> probably want for what you're about to do as root. If you already have 
> those directories on your regular user's PATH (which is not the 
> default), "su -" probably doesn't help you much. But it does for most 
> people.
>
> Paul.
>
Hmm. So I give up my regular editor in return for not having to type /sbin/

Well, I think I'll go along the way I am. I'm a pretty good typist.

I thought there might be a *real* reason, and I had missed something. I
was wondering if there might be some subtle problems which would bite
me later.

Thanks.

Mike

-- 
p="p=%c%s%c;main(){printf(p,34,p,34);}";main(){printf(p,34,p,34);}
This message made from 100% recycled bits.
I can explain it for you, but I can't understand it for you.
I speak only for myself, and I am unanimous in that!




More information about the fedora-list mailing list