Debian Codegraph @

debian/etc/sudoers

raw
1 ##
2 ## sudoers file.
3 ##
4 ## This file MUST be edited with the 'visudo' command as root.
5 ## Failure to use 'visudo' may result in syntax or file permission errors
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
11 # This causes mail to be sent to the mailto user if the user running
12 # sudo does not enter the correct password. This is off in Debian by
13 # default since Debian 14.
14 #Defaults mail_badpass
15
16 ##
17 ## Host alias specification
18 ##
19 ## Groups of machines. These may include host names (optionally with wildcards),
20 ## IP addresses, network numbers or netgroups.
21 # Host_Alias WEBSERVERS = www1, www2, www3
22
23 ##
24 ## User alias specification
25 ##
26 ## Groups of users. These may consist of user names, uids, Unix groups,
27 ## or netgroups.
28 # User_Alias ADMINS = millert, dowdy, mikef
29
30 ##
31 ## Cmnd alias specification
32 ##
33 ## Groups of commands. Often used to group related commands together.
34 # Cmnd_Alias PROCESSES = /usr/bin/nice, /bin/kill, /usr/bin/renice, \
35 # /usr/bin/pkill, /usr/bin/top
36 #
37 # Cmnd_Alias REBOOT = /sbin/halt, /sbin/reboot, /sbin/poweroff
38 #
39 # Cmnd_Alias PKGMAN = /usr/bin/apt, /usr/bin/dpkg, /usr/bin/rpm, \
40 # /usr/bin/yum, /usr/bin/dnf, /usr/bin/zypper, \
41 # /usr/bin/pacman
42
43 ##
44 ## Defaults specification
45 ##
46 ## Preserve editor environment variables for visudo.
47 ## To preserve these for all commands, remove the "!visudo" qualifier.
48 Defaults!/usr/sbin/visudo env_keep += "SUDO_EDITOR EDITOR VISUAL"
49 ##
50 ## Preserve EDITOR environment variables for all users in the sudo group.
51 ## This allows running arbitrary commands, but sudo members are root
52 ## equivalent anyway.
53 #Defaults:%sudo env_keep += "SUDO_EDITOR EDITOR VISUAL"
54 ##
55 ## Use a hard-coded PATH instead of the user's to find commands.
56 ## This also helps prevent poorly written scripts from running
57 ## arbitrary commands under sudo.
58 Defaults secure_path="/usr/sbin:/usr/bin:/sbin:/bin"
59 ##
60 ## You may wish to keep some of the following environment variables
61 ## when running commands via sudo.
62 ##
63 ## Locale settings
64 # Defaults env_keep += "LANG LANGUAGE LINGUAS LC_* _XKB_CHARSET"
65 ##
66 ## Run X applications through sudo; HOME is used to find the
67 ## .Xauthority file. Note that other programs use HOME to find
68 ## configuration files and this may lead to privilege escalation!
69 # Defaults env_keep += "HOME"
70 ##
71 ## X11 resource path settings
72 # Defaults env_keep += "XAPPLRESDIR XFILESEARCHPATH XUSERFILESEARCHPATH"
73 ##
74 ## Desktop path settings
75 # Defaults env_keep += "QTDIR KDEDIR"
76 ##
77 ## Allow sudo-run commands to inherit the callers' ConsoleKit session
78 # Defaults env_keep += "XDG_SESSION_COOKIE"
79 ##
80 ## Uncomment to enable special input methods. Care should be taken as
81 ## this may allow users to subvert the command being run via sudo.
82 # Defaults env_keep += "XMODIFIERS GTK_IM_MODULE QT_IM_MODULE QT_IM_SWITCHER"
83 ##
84 ## Uncomment to preserve proxy settings from user environments of root
85 ## equivalent users (group sudo)
86 # Defaults:%sudo env_keep += "http_proxy https_proxy ftp_proxy all_proxy no_proxy"
87 ##
88 ## Uncomment to preserve environment variables for grep
89 # Defaults:%sudo env_keep += "GREP_COLOR"
90 ##
91 ## Uncomment to preserve git related environment. While you shouldn't
92 ## normally run git as root, you need to with etckeeper
93 # Defaults:%sudo env_keep += "GIT_AUTHOR_* GIT_COMMITTER_*"
94 ##
95 ## Uncomment to preserve Debian-related environment variables. root
96 ## won't have sensible values for them.
97 # Defaults:%sudo env_keep += "EMAIL DEBEMAIL DEBFULLNAME"
98 ##
99 ## Uncomment to allow root to use the calling user's ssh agent
100 ## transparently. This enabled "sudo scp" or "sudo rsync"
101 # Defaults:%sudo env_keep += "SSH_AGENT_PID SSH_AUTH_SOCK"
102 ##
103 ## Uncomment to allow root to use the calling user's gpg agent
104 ## transparently. This enabled "sudo scp" or "sudo rsync"
105 # Defaults:%sudo env_keep += "GPG_AGENT_INFO"
106 ##
107 ## Uncomment to disable "use_pty" when running commands as root.
108 ## Commands run as non-root users will run in a pseudo-terminal,
109 ## not the user's own terminal, to prevent command injection.
110 # Defaults>root !use_pty
111 ##
112 ## Uncomment to run commands in the background by default.
113 ## This can be used to prevent sudo from consuming user input while
114 ## a non-interactive command runs if "use_pty" or I/O logging are
115 ## enabled. Some commands may not run properly in the background.
116 # Defaults exec_background
117 ##
118 ## Uncomment to send mail if the user does not enter the correct password.
119 # Defaults mail_badpass
120 ##
121 ## Uncomment to enable logging of a command's output, except for
122 ## sudoreplay and reboot. Use sudoreplay to play back logged sessions.
123 ## Sudo will create up to 2,176,782,336 I/O logs before recycling them.
124 ## Set maxseq to a smaller number if you don't have unlimited disk space.
125 # Defaults log_output
126 # Defaults!/usr/bin/sudoreplay !log_output
127 # Defaults!REBOOT !log_output
128 # Defaults maxseq = 1000
129 ##
130 ## Uncomment to disable intercept and log_subcmds for debuggers and
131 ## tracers. Otherwise, anything that uses ptrace(2) will be unable
132 ## to run under sudo if intercept_type is set to "trace".
133 # Defaults!DEBUGGERS !intercept, !log_subcmds
134 ##
135 ## Uncomment to disable intercept and log_subcmds for package managers.
136 ## Some package scripts run a huge number of commands, which is made
137 ## slower by these options and also can clutter up the logs.
138 # Defaults!PKGMAN !intercept, !log_subcmds
139 ##
140 ## Uncomment to disable PAM silent mode. Otherwise messages by PAM
141 ## modules such as pam_faillock will not be printed.
142 # Defaults !pam_silent
143 ##
144 ## Uncomment for sudo to require the password of the target user to
145 ## allow changing users. By default, with this commented, sudo asks for
146 ## the password of the calling user.
147 ## Before uncommenting this, make sure that all your local configuration
148 ## that is intended to escalate privileges with the credentials of the
149 ## calling user have an explicit "Defaults:<entity> !targetpw" line.
150 # Defaults targetpw
151
152 ##
153 ## Runas alias specification
154 ##
155
156 ##
157 ## User privilege specification
158 ##
159 root ALL=(ALL:ALL) ALL
160
161 # Allow members of group sudo to execute any command.
162 # This is going to become optional at some point in the future, so please
163 # consider adding a file in /etc/sudoers.d/zz_group_sudo containing this if
164 # you want the sudo group to work. See also Bug#1136732.
165 Defaults:%wheel !targetpw
166 %sudo ALL=(ALL:ALL) ALL
167
168 ## Read drop-in files from /etc/sudoers.d. Consider setting
169 ## !targetpw in your snippets, so that Debian might change the
170 ## default at some time in the future.
171 ## See sudoers(5) for more information on "@include" directives:
172 @includedir /etc/sudoers.d