$ su -
Password:
# echo $PATH
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
# exit
logout
$ su
Password:
# echo $PATH
/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games
I have no idea why /bin and /sbin are not added to $PATH
, if I do the plain su. This used to be the case. How can I fix this? I did notice that:
-rw-r--r-- 1 root root 0 Jan 8 2018 /etc/environment
But otherwise my system seems normal.
EDIT: I forgot the obligatory uname -a
Linux rpi3 4.17.0-1-arm64 #1 SMP Debian 4.17.8-1 (2018-07-20) aarch64 GNU/Linux
EDIT2:
$ cat /etc/issue
Debian GNU/Linux buster/sid \n \l
all of the packages are from the "testing" repo, since "stable" ones don't work very well on aarch64.
/bin
in both of your examples. you you say “I have no idea why /bin … are not added to $PATH”dpkg -S $(which su)
and dpkg -l packagefromresult to know its version