Re: [su] New su utility messes with my PATH

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 09/15/2012 02:17 PM, Thomas Bächler wrote:
I found what I think is absolutely unexpected behaviour in the new su
utility. It seems to have been introduced by commit a6fdd3f8.

It is about /sbin and /usr/sbin being in the path: Whenever you switch
to a non-root user, they are removed from the path, and when you switch
to root, they are added. I find it completely unexpected that su (when
not running with -l) messes with my environment at all.

Commands like
  PATH=... su -c "cmd" user
do not work as expected.

In my opinion, when you wish your path (or anything in the environment)
to change you should a) use -l to start a login shell or b) configure
your scripts to take care of it.

I propose to revert the mentioned patch. Opinions?

Ouch, I agree.
su shouldn't be messing with PATH at all IMHO.

cheers,
Pádraig.
--
To unsubscribe from this list: send the line "unsubscribe util-linux" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux