|
| 1 | +## |
1 | 2 | ## sudoers file. |
2 | 3 | ## |
3 | 4 | ## This file MUST be edited with the 'visudo' command as root. |
4 | 5 | ## Failure to use 'visudo' may result in syntax or file permission errors |
5 | 6 | ## that prevent sudo from running. |
| 7 | + |
| 8 | +## Please consider adding local content in /etc/sudoers.d/ instead of |
| 9 | +## directly modifying this file. |
| 10 | + |
6 | 11 | ## |
7 | 12 | ## See the sudoers man page for the details on how to write a sudoers file. |
8 | 13 | ## |
|
30 | 35 | # |
31 | 36 | # Cmnd_Alias REBOOT = /sbin/halt, /sbin/reboot, /sbin/poweroff |
32 | 37 | # |
33 | | -# Cmnd_Alias DEBUGGERS = /usr/bin/gdb, /usr/bin/lldb, /usr/bin/strace, \ |
34 | | -# /usr/bin/truss, /usr/bin/bpftrace, \ |
35 | | -# /usr/bin/dtrace, /usr/bin/dtruss |
36 | | -# |
37 | 38 | # Cmnd_Alias PKGMAN = /usr/bin/apt, /usr/bin/dpkg, /usr/bin/rpm, \ |
38 | 39 | # /usr/bin/yum, /usr/bin/dnf, /usr/bin/zypper, \ |
39 | 40 | # /usr/bin/pacman |
|
45 | 46 | ## To preserve these for all commands, remove the "!visudo" qualifier. |
46 | 47 | Defaults!@visudo@ env_keep += "SUDO_EDITOR EDITOR VISUAL" |
47 | 48 | ## |
| 49 | +## Preserve EDITOR environment variables for all users in the sudo group. |
| 50 | +## This allows running arbitrary commands, but sudo members are root |
| 51 | +## equivalent anyway. |
| 52 | +#Defaults:%sudo env_keep += "SUDO_EDITOR EDITOR VISUAL" |
| 53 | +## |
48 | 54 | ## Use a hard-coded PATH instead of the user's to find commands. |
49 | 55 | ## This also helps prevent poorly written scripts from running |
50 | 56 | ## arbitrary commands under sudo. |
@@ -74,6 +80,10 @@ Defaults!@visudo@ env_keep += "SUDO_EDITOR EDITOR VISUAL" |
74 | 80 | ## this may allow users to subvert the command being run via sudo. |
75 | 81 | # Defaults env_keep += "XMODIFIERS GTK_IM_MODULE QT_IM_MODULE QT_IM_SWITCHER" |
76 | 82 | ## |
| 83 | +## Uncomment to preserve proxy settings from user environments of root |
| 84 | +## equivalent users (group sudo) |
| 85 | +# Defaults:%sudo env_keep += "http_proxy https_proxy ftp_proxy all_proxy no_proxy" |
| 86 | +## |
77 | 87 | ## Uncomment to disable "use_pty" when running commands as root. |
78 | 88 | ## Commands run as non-root users will run in a pseudo-terminal, |
79 | 89 | ## not the user's own terminal, to prevent command injection. |
|
0 commit comments