Author Topic: Debian 10 missing /sbin and /usr/sbin path after su  (Read 9931 times)


  • Administrator
  • Sr. Member

  • Offline
  • *****
  • 299
    • View Profile
    • Higher Intellect
Debian 10 missing /sbin and /usr/sbin path after su
« 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