Mailinglist Archive: opensuse (1264 mails)

< Previous Next >
Re: [opensuse] konsole

On 22/06/2017 15:20, Anton Aylward wrote:
On 22/06/17 08:43 AM, Dave Plater wrote:

Do you get asked for the password for eah of "su" and "su -"?
As user execute su and give required password, yes I'm asked for a password
going from user level to root level. If I'm logged in as root via su and I
execute su - I'm not asked for a password because I'm already root.

Obviously, but that's not what I asked.

Sorry, thypo, but I though it was obvious:

1. Log in as user.
This should be SHLVL=1. If its not, then something is very wrong.
2. Run "su". Do you get asked for password?
This should be SHLVL=2.
3. Log out of "su" back to user
4. Run "su -". Do you get asked for password?
This should be SHLVL=1.

I hope you do get asked for password @ #4

I actually agree with you 100%, I was just correcting your original statement about su which after reading the man page pointed to the result of su --preserve-environment.
"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 & /usr/sbin
> in the PATH"
I just tested su -p and it leaves out /sbin:/usr/sbin from $PATH maybe some configuration on your machine makes su default to su -p. My su behaves exactly as stated in the man page it allows me to chown root files though. Up to date 42.2 system.
Dave P

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

< Previous Next >
This Thread
Follow Ups