1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61
|
The default /etc/sudoers file created on installation of the
sudo package includes the directive:
@includedir /etc/sudoers.d
This will cause sudo to read and parse any files in the /etc/sudoers.d
directory that do not end in '~' or contain a '.' character, if it
exists. It is not an error if the directory does not exist.
Note also, that because sudoers contents can vary widely, no attempt is
made to add this directive to existing sudoers files on upgrade. Feel free
to add the above directive to the end of your /etc/sudoers file to enable
this functionality for existing installations if you wish!
Finally, please note that using the visudo command is the recommended way
to update sudoers content, since it protects against many failure modes.
See the man page for visudo and sudoers for more information.
- - - - -
The version of sudo that ships with Debian by default resets the
environment, as described by the "env_reset" flag in the sudoers file.
This implies that all environment variables are removed, except for
LOGNAME, PATH, SHELL, TERM, DISPLAY, XAUTHORITY, XAUTHORIZATION, XAPPLRESDIR,
XFILESEARCHPATH, XUSERFILESEARCHPATH, LANG, LANGUAGE, LC_*, and USER.
In case you want sudo to preserve more environment variables, you must
specify the env_keep variable in the sudoers file. You should edit the
sudoers file using the visudo tool.
Examples:
Preserve the default variables plus the EDITOR variable:
Defaults env_keep+="EDITOR"
Preserve the default variables plus all variables starting with LC_:
Defaults env_keep+="LC_*"
- - - - -
The sudo-ldap package has been removed in Debian 14.
- - - - -
Note that the support for the sss provider (libsss_sudo.so) that allows sudo
to use SSSD as a cache for policies stored in LDAP is included in the sudo
package.
- - - - -
See the file OPTIONS in this directory for more information on the sudo
build options used in building the Debian package.
- - - - -
If you're having trouble grasping the fundamental idea of what sudo is all
about, here's a succinct and humorous take on it...
http://www.xkcd.com/c149.html
|