sudoers: set Defaults secure_path to have sane default settings master
authorMichael Prokop <mika@grml.org>
Thu, 2 Apr 2020 09:56:18 +0000 (11:56 +0200)
committerMichael Prokop <mika@grml.org>
Thu, 2 Apr 2020 09:56:18 +0000 (11:56 +0200)
commitc557940f98cb23335d5f3cc16492eed60936dc32
tree33bbc3bb3c97626a8afa133e0b26d9740a79f66b
parent95f776581b60e5cb71d51955917f5dd7a8a7a482
sudoers: set Defaults secure_path to have sane default settings

If the user (non-root) doesn't have /sbin:/usr/sbin inside $PATH (as
present when invoking `mksh -l`, which causes /etc/profile to be
sourced and setting $PATH), then executing sudo might fail with:

| $ sudo apt-get install rdesktop
| [...]
| dpkg: warning: 'ldconfig' not found in PATH or not executable
| dpkg: warning: 'start-stop-daemon' not found in PATH or not executable
| dpkg: error: 2 expected programs not found in PATH or not executable
| Note: root's PATH should usually contain /usr/local/sbin, /usr/sbin and /sbin

Ensure to have a working $PATH setting when invoking sudo
by explicitly setting secure_path.

Closes: https://github.com/grml/grml/issues/144
etc/grml/fai/config/files/etc/sudoers/GRMLBASE