On 04/13/2018 02:39 PM, Patrick Shanahan wrote:
* Mark Hounschell <markh@compro.net> [04-13-18 14:36]:
Previously, in 13.2 and Leap the su command did not need the "-" to get the full --login PATH env variable. I forget when this changed. In Leap-15 it appears to have changed back to the MUCH older way. 13.2: #su # echo $PATH /sbin:/usr/sbin:/usr/local/sbin:/root/bin:/usr/local/bin:/usr/bin:/bin:/usr/bin/X11:/usr/games:/usr/lib/mit/bin:/usr/lib/mit/sbin
Leap 42.3: #su # echo $PATH /sbin:/usr/sbin:/usr/local/sbin:/root/bin:/usr/local/bin:/usr/bin:/bin:/usr/bin/X11:/usr/games:/usr/lib/mit/bin:/usr/lib/mit/sbin
Leap-15: #su # echo $PATH /sbin:/bin:/usr/sbin:/usr/bin
# su - # echo $PATH /sbin:/usr/sbin:/usr/local/sbin:/root/bin:/usr/local/bin:/usr/bin:/bin:/usr/lib/mit/bin:/usr/lib/mit/sbin
Just curious if that was intended?
probably a local setting as I don't recall "su" ever defaulting to root environment. I always use "su - " sometimes adding <user>.
Well, I haven't made any "local" setting that changed the behavior. That setting appears to be in /etc/default/su. I forget when I noticed the change, but it was quite some time ago. Leap-15 has changed it back. Leap-42.3: # cat /leap/etc/default/su # Per default, only "su -" will set a new PATH. # If this variable is changed to "yes" (default is "no"), # every su call will overwrite the PATH variable. ALWAYS_SET_PATH=no Leap-15: # cat /etc/default/su # Per default, only "su -" will set a new PATH. # If this variable is set to "yes" (default is "no"), # every su call will overwrite the PATH variable. # # The recommended default is "yes". The default "no" behavior could have # a security implication in applications that use commands without path. ALWAYS_SET_PATH=yes So it is clearly a change in behavior but that comment answers my question. It appears to be an intended change. Regards Mark -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org