I have set a PATH variable in /etc/environment
. When I log into my system as root, the path variable is correctly applied. However, when I log in as another user and then become root via
sudo su -
/etc/environment
doesn't seem to get honoured. Why is that? How can I change it?
output of grep readenv /etc/pam.d/su
:
# parsing /etc/environment needs "readenv=1"
session required pam_env.so readenv=1
session required pam_env.so readenv=1 envfile=/etc/default/locale
cat /etc/lsbrelease:
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=16.04
DISTRIB_CODENAME=xenial
DISTRIB_DESCRIPTION="Ubuntu 16.04.6 LTS"
dpkg -S /bin/su:
login: /bin/su
0 Answers