Modern su
não redefine mais PATH
do chamador quando solicitado a preservar o ambiente; Se você precisar que isso aconteça, execute su --login
.
De /usr/share/doc/util-linux/NEWS.Debian.gz
:
- new 'su' (with no args, i.e. when preserving the environment) also
preserves PATH and IFS, while old su would always reset PATH and IFS
even in 'preserve environment' mode.
...
The first difference is probably the most user visible one. Doing
plain 'su' is a really bad idea for many reasons, so using 'su -' is
strongly recommended to always get a newly set up environment similar
to a normal login. If you want to restore behaviour more similar to
the previous one you can add 'ALWAYS_SET_PATH yes' in /etc/login.defs.