Mailinglist Archive: opensuse (1264 mails)

< Previous Next >
Re: [opensuse] konsole

On 22/06/2017 13:10, Carlos E. R. wrote:
On 2017-06-22 11:34, Dave Plater wrote:

On 18/06/2017 14:31, Anton Aylward wrote:
Running just "su" alone meremly changes your effective UID.
By default, it is to root, but could to to another user.
It does not alter HOME, SHELL, USER, LOGNAME, and PATH.
That last one is important. A real root shell expects to have /sbin &
in the PATH
The only difference between su and su - is $USER is normal user for the
former and is root for the latter.

No, both commands change to "root" as given above. And with both you can
change to any user:

su john
su - john

What I mean is if you are logged in as user john in any terminal and then you execute su and give the root password, your $HOME is /root and $USER=john but if you execute su - and give the password then your $USER=root. Anton represented plain su as sudo where $HOME remains /home/john.
Dave P

To unsubscribe, e-mail: opensuse+unsubscribe@xxxxxxxxxxxx
To contact the owner, e-mail: opensuse+owner@xxxxxxxxxxxx

< Previous Next >
This Thread
Follow Ups