Re: su don't give me ANY priviliges

From: Doug Laidlaw (
Date: 03/03/05

Date: Thu, 03 Mar 2005 19:46:00 +1100

Robert M. Riches Jr. wrote:

> On 2005-03-03, Doug Laidlaw <> wrote:
>> I often wondered about this one. I run Mandrake with KDE. I always use
>> just plain "su" in a Konsole. That makes me root in the current
>> directory.
>> If I use "su -" I become root in /root, not usually what I want.
>> According to the man page, su - is the same as "su -l" and makes my shell
>> a
>> login shell. If that means that I can logout from it, or that I should
>> logout instead of typing exit, it is a matter of no consequence to me.
> The difference, as you have discovered, between 'su' and 'su
> -' (or 'su -l') is at the beginning. The former may leave
> you in the original (non /root) cwd and retain the old
> non-root environment variables, aliases, etc. The latter
> (two) will put you in /root and give you fresh root-based
> environment variables, aliases, etc.
> Use 'exit' to terminate the root shell in either case.
> Robert Riches
> (Yes, that is one of my email addresses.)

Thanks. Does that mean that I have the PATH etc. of my user account?
(In practice, I am usually wanting to run something like rpm. I think that
my entire path for root is part of my user path anyway.)

Just out of interest, here is a log entry for su that was just looking
at me:

session opened for user root by doug(uid=500)


ICQ Number 178748389. Registered Linux User No. 277548.
The most profound joy has more of gravity than of gaiety in it.
        - Michel de Montaigne.