2 .\" Copyright (c) 2010-2013 Todd C. Miller <Todd.Miller@courtesan.com>
4 .\" Permission to use, copy, modify, and distribute this software for any
5 .\" purpose with or without fee is hereby granted, provided that the above
6 .\" copyright notice and this permission notice appear in all copies.
8 .\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
9 .\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
10 .\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
11 .\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
12 .\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
13 .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
14 .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
15 .\" ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
18 .Dt SUDO @mansectform@
19 .Os Sudo @PACKAGE_VERSION@
22 .Nd configuration for sudo front end
26 file is used to configure the
29 It specifies the security policy and I/O logging plugins, debug flags
30 as well as plugin-agnostic path names and settings.
34 file supports the following directives, described in detail below.
37 a security policy or I/O logging plugin
39 a plugin-agnostic path
41 a front end setting, such as
46 debug flags to aid in debugging
57 is used to indicate a comment.
58 Both the comment character and any text after it, up to the end of
59 the line, are ignored.
61 Long lines can be continued with a backslash
63 as the last character on the line.
64 Note that leading white space is removed from the beginning of lines
65 even when the continuation character is used.
67 Non-comment lines that don't begin with
77 file is always parsed in the
80 .Ss Plugin configuration
82 supports a plugin architecture for security policies and input/output
84 Third parties can develop and distribute their own policy and I/O
85 logging plugins to work seamlessly with the
88 Plugins are dynamically loaded based on the contents of
95 keyword, followed by the
99 to the shared object containing the plugin.
103 .Li struct policy_plugin
106 in the plugin shared object.
109 may be fully qualified or relative.
110 If not fully qualified, it is relative to the
114 .Bd -literal -offset indent
115 Plugin sudoers_policy sudoers.so
119 .Bd -literal -offset indent
120 Plugin sudoers_policy @PLUGINDIR@/sudoers.so
125 1.8.5, any additional parameters after the
127 are passed as arguments to the plugin's
130 For example, to override the compile-time default sudoers file mode:
131 .Bd -literal -offset indent
132 Plugin sudoers_policy sudoers.so sudoers_mode=0440
135 The same shared object may contain multiple plugins, each with a
136 different symbol name.
137 The shared object file must be owned by uid 0 and only writable by its owner.
138 Because of ambiguities that arise from composite policies, only a single
139 policy plugin may be specified.
140 This limitation does not apply to I/O plugins.
144 file is present, or if it contains no
148 plugin will be used as the default security policy and for I/O logging
149 (if enabled by the policy).
150 This is equivalent to the following:
151 .Bd -literal -offset indent
152 Plugin sudoers_policy sudoers.so
153 Plugin sudoers_io sudoers.so
156 For more information on the
158 plugin architecture, see the
159 .Xr sudo_plugin @mansectsu@
166 keyword, followed by the name of the path to set and its value.
168 .Bd -literal -offset indent
169 Path noexec @noexec_file@
170 Path askpass /usr/X11R6/bin/ssh-askpass
173 The following plugin-agnostic paths may be set in the
174 .Pa @sysconfdir@/sudo.conf
178 The fully qualified path to a helper program used to read the user's
179 password when no terminal is available.
180 This may be the case when
182 is executed from a graphical (as opposed to text-based) application.
183 The program specified by
185 should display the argument passed to it as the prompt and write
186 the user's password to the standard output.
189 may be overridden by the
191 environment variable.
193 The fully-qualified path to a shared library containing dummy
199 library functions that just return an error.
200 This is used to implement the
202 functionality on systems that support
205 The default value is:
208 The fully-qualified path to the
211 This setting is only used when
213 is built with SELinux support.
220 file also supports the following front end settings:
225 itself are disabled by default.
228 crashes, you may wish to re-enable core dumps by setting
233 .Bd -literal -offset indent
234 Set disable_coredump false
237 Note that most operating systems disable core dumps from setuid programs,
242 core file you will likely need to enable core dumps for setuid processes.
243 On BSD and Linux systems this is accomplished in the
248 command is used to configure core dump behavior.
250 This setting is only available in
252 version 1.8.4 and higher.
255 passes the invoking user's group list to the policy and I/O plugins.
256 On most systems, there is an upper limit to the number of groups that
257 a user may belong to simultaneously (typically 16 for compatibility
262 .Dl getconf NGROUPS_MAX
263 will return the maximum number of groups.
265 However, it is still possible to be a member of a larger number of
266 groups--they simply won't be included in the group list returned
267 by the kernel for the user.
270 version 1.8.7, if the user's kernel group list has the maximum number
273 will consult the group database directly to determine the group list.
274 This makes it possible for the security policy to perform matching by group
275 name even when the user is a member of more than the maximum number of groups.
279 setting allows the administrator to change this default behavior.
285 Use the static group list that the kernel returns.
286 Retrieving the group list this way is very fast but it is subject
287 to an upper limit as described above.
290 in that it does not reflect changes to the group database made
291 after the user logs in.
292 This was the default behavior prior to
296 Always query the group database directly.
299 in that changes made to the group database after the user logs in
300 will be reflected in the group list.
301 On some systems, querying the group database for all of a user's
302 groups can be time consuming when querying a network-based group
304 Most operating systems provide an efficient method of performing
308 supports efficient group queries on AIX, BSD, HP-UX, Linux and
311 Only query the group database if the static group list returned
312 by the kernel has the maximum number of entries.
313 This is the default behavior in
318 For example, to cause
320 to only use the kernel's static list of groups for the user:
321 .Bd -literal -offset indent
322 Set group_source static
325 This setting is only available in
327 version 1.8.7 and higher.
329 The maximum number of user groups to retrieve from the group database.
330 This setting is only used when querying the group database directly.
331 It is intended to be used on systems where it is not possible to detect
332 when the array to be populated with group entries is not sufficiently large.
335 will allocate four times the system's maximum number of groups (see above)
336 and retry with double that number if the group database query fails.
337 However, some systems just return as many entries as will fit and
338 do not indicate an error when there is a lack of space.
340 This setting is only available in
342 version 1.8.7 and higher.
346 versions 1.8.4 and higher support a flexible debugging framework
347 that can help track down what
349 is doing internally if there is a problem.
355 keyword, followed by the name of the program (or plugin) to debug
356 .Pq Nm sudo , Nm visudo , Nm sudoreplay , Nm sudoers ,
357 the debug file name and a comma-separated list of debug flags. The
358 debug flag syntax used by
363 .Em subsystem Ns No @ Ns Em priority
364 but a plugin is free to use a different format so long as it does
369 .Bd -literal -offset indent
370 Debug sudo /var/log/sudo_debug all@warn,plugin@info
373 would log all debugging statements at the
375 level and higher in addition to those at the
377 level for the plugin subsystem.
381 entry per program is supported. The
384 entry is shared by the
388 and the plugins. A future release may add support for per-plugin
390 lines and/or support for multiple debugging files for a single
393 The priorities used by the
395 front end, in order of decreasing severity, are:
396 .Em crit , err , warn , notice , diag , info , trace
399 Each priority, when specified, also includes all priorities higher
400 than it. For example, a priority of
402 would include debug messages logged at
406 The following subsystems are used by the
411 matches every subsystem
413 command line argument processing
424 network interface handling
426 communication with the plugin
430 pseudo-tty related code
432 SELinux-specific handling
440 .Xr sudoers @mansectform@
441 plugin includes support for additional subsystems.
444 .It Pa @sysconfdir@/sudo.conf
446 front end configuration
451 # Default @sysconfdir@/sudo.conf file
454 # Plugin plugin_name plugin_path plugin_options ...
455 # Path askpass /path/to/askpass
456 # Path noexec /path/to/sudo_noexec.so
457 # Debug sudo /var/log/sudo_debug all@warn
458 # Set disable_coredump true
460 # The plugin_path is relative to @PLUGINDIR@ unless
462 # The plugin_name corresponds to a global symbol in the plugin
463 # that contains the plugin interface structure.
464 # The plugin_options are optional.
466 # The sudoers plugin is used by default if no Plugin lines are
468 Plugin sudoers_policy sudoers.so
469 Plugin sudoers_io sudoers.so
474 # An askpass helper program may be specified to provide a graphical
475 # password prompt for "sudo -A" support. Sudo does not ship with
476 # its own askpass program but can use the OpenSSH askpass.
478 # Use the OpenSSH askpass
479 #Path askpass /usr/X11R6/bin/ssh-askpass
481 # Use the Gnome OpenSSH askpass
482 #Path askpass /usr/libexec/openssh/gnome-ssh-askpass
487 # Path to a shared library containing dummy versions of the execv(),
488 # execve() and fexecve() library functions that just return an error.
489 # This is used to implement the "noexec" functionality on systems that
490 # support C<LD_PRELOAD> or its equivalent.
491 # The compiled-in value is usually sufficient and should only be
492 # changed if you rename or move the sudo_noexec.so file.
494 #Path noexec @noexec_file@
499 # By default, sudo disables core dumps while it is executing
500 # (they are re-enabled for the command that is run).
501 # To aid in debugging sudo problems, you may wish to enable core
502 # dumps by setting "disable_coredump" to false.
504 #Set disable_coredump false
509 # Sudo passes the user's group list to the policy plugin.
510 # If the user is a member of the maximum number of groups (usually 16),
511 # sudo will query the group database directly to be sure to include
512 # the full list of groups.
514 # On some systems, this can be expensive so the behavior is configurable.
515 # The "group_source" setting has three possible values:
516 # static - use the user's list of groups returned by the kernel.
517 # dynamic - query the group database to find the list of groups.
518 # adaptive - if user is in less than the maximum number of groups.
519 # use the kernel list, else query the group database.
521 #Set group_source static
524 .Xr sudoers @mansectform@ ,
525 .Xr sudo @mansectsu@ ,
526 .Xr sudo_plugin @mansectsu@
528 See the HISTORY file in the
530 distribution (http://www.sudo.ws/sudo/history.html) for a brief
533 Many people have worked on
535 over the years; this version consists of code written primarily by:
536 .Bd -ragged -offset indent
540 See the CONTRIBUTORS file in the
542 distribution (http://www.sudo.ws/sudo/contributors.html) for an
543 exhaustive list of people who have contributed to
546 If you feel you have found a bug in
548 please submit a bug report at http://www.sudo.ws/sudo/bugs/
550 Limited free support is available via the sudo-users mailing list,
551 see http://www.sudo.ws/mailman/listinfo/sudo-users to subscribe or
557 and any express or implied warranties, including, but not limited
558 to, the implied warranties of merchantability and fitness for a
559 particular purpose are disclaimed.
560 See the LICENSE file distributed with
562 or http://www.sudo.ws/sudo/license.html for complete details.