Higher Intellect | preterhuman.net

Discussion => Computing, Internet & Technology => Topic started by: netfreak on October 27, 2019, 08:27:00 pm

Title: Debian 10 missing /sbin and /usr/sbin path after su
Post by: netfreak on October 27, 2019, 08:27:00 pm
Seems a new annoyance under Debian 10 is by default the /sbin and /usr/sbin paths are not part of the shell environment when you su to root. Workaround is to edit the /etc/login.defs and add "ALWAYS_SET_PATH yes" so the config should look something like this:

Code: [Select]
# *REQUIRED*  The default PATH settings, for superuser and normal users.
# (they are minimal, add the rest in the shell startup files)
ENV_SUPATH      PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
ENV_PATH        PATH=/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games

Relevant details found at https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=918754