I tried editing /etc/environment
, changed it by removing games
and adding my swift installation location, so now it looks like:
PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/opt/swift/usr/bin"
That didn't work (even tried booting).
After searching for a solution, I came to realize that PAM aware applications (I have UsePAM no
in my sshd_config
, but I tried this anyway) use the file /etc/login.defs
.
Went on and changed it, removed the games
and added swift (to the su
version as well).
ENV_SUPATH PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/opt/swift/usr/bin
ENV_PATH PATH=/usr/local/bin:/usr/bin:/bin:/opt/swift/usr/bin
That didn't help as well.
After rebooting the machine - I still have games
in my path, and no swift.
Tried removing /etc/profile/apps-bin-path.sh
, my path is still:
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games
Where is games
coming from?
Why doesn't my path change?
I need this variable to be set for both login and non login shells, including non bash shells.