User Tools

Site Tools


linux:sudo:sudoers:set_a_secure_path

Linux - Sudo - Sudoers - Set a Secure PATH

This is the path used for every command run with sudo, it has two importance :

  1. Used when a system administrator does not trust sudo users to have a secure PATH environment variable.
  2. To separate “root path” and “user path”, only users defined by exempt_group are not affected by this setting.

To set it, add the line:

Defaults secure_path="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin"
linux/sudo/sudoers/set_a_secure_path.txt · Last modified: 2023/07/17 21:02 by peter

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki