1 .\" Automatically generated from an mdoc input file. Do not edit.
3 .\" SPDX-License-Identifier: ISC
5 .\" Copyright (c) 1996,1998-2005, 2007-2018
6 .\" Todd C. Miller <Todd.Miller@sudo.ws>
8 .\" Permission to use, copy, modify, and distribute this software for any
9 .\" purpose with or without fee is hereby granted, provided that the above
10 .\" copyright notice and this permission notice appear in all copies.
12 .\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
13 .\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
14 .\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
15 .\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
16 .\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
17 .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
18 .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
20 .\" Sponsored in part by the Defense Advanced Research Projects
21 .\" Agency (DARPA) and Air Force Research Laboratory, Air Force
22 .\" Materiel Command, USAF, under agreement number F39502-99-1-0512.
24 .TH "VISUDO" "@mansectsu@" "December 24, 2018" "Sudo @PACKAGE_VERSION@" "System Manager's Manual"
29 \- edit the sudoers file
34 [[\fB\-f\fR]\ \fIsudoers\fR]
39 file in a safe fashion, analogous to
44 file against multiple simultaneous edits, provides basic sanity checks,
45 and checks for parse errors.
48 file is currently being edited you will receive a message to try again later.
53 file after editing and will not save the changes if there is a syntax error.
54 Upon finding an error,
56 will print a message stating the line number(s)
57 where the error occurred and the user will receive the
60 At this point the user may enter
66 to exit without saving the changes, or
68 to quit and save changes.
71 option should be used with extreme caution because if
73 believes there to be a parse error, so will
78 again until the error is fixed.
83 file after a parse error has been detected, the cursor will be placed on
84 the line where the error occurred (if the editor supports this feature).
88 settings that determine which editor
95 separated list of editors allowed to be used with
98 will choose the editor that matches the user's
103 environment variable if possible, or the first editor in the
104 list that exists and is executable.
110 environment variables are not preserved by default when the
114 The default editor path is
116 which can be set at compile time via the
123 will use the value of the
128 environment variables before falling back on the default editor list.
129 Note that this may create a security hole as it allows the user to
130 run any arbitrary command as root without logging.
131 A safer alternative is to place a colon-separated list of editors
141 if they match a value specified in
150 environment variables must be present in the
154 flag to function when
160 which can be set at compile time via the
161 \fR--with-env-editor\fR
164 The options are as follows:
166 \fB\-c\fR, \fB\--check\fR
172 file (and any other files it includes) will be
173 checked for syntax errors.
176 file was not specified,
178 will also check the file owner and mode.
179 A message will be printed to the standard output describing the status of
183 option was specified.
184 If the check completes successfully,
186 will exit with a value of 0.
187 If an error is encountered,
189 will exit with a value of 1.
191 \fB\-f\fR \fIsudoers\fR, \fB\--file\fR=\fIsudoers\fR
194 file location, see below.
195 As of version 1.8.27, the
197 path can be specified without using the
201 \fB\-h\fR, \fB\--help\fR
202 Display a short help message to the standard output and exit.
204 \fB\-q\fR, \fB\--quiet\fR
208 In this mode details about syntax errors are not printed.
209 This option is only useful when combined with
214 \fB\-s\fR, \fB\--strict\fR
220 If an alias is referenced but not actually defined
221 or if there is a cycle in an alias,
223 will consider this a parse error.
224 Note that it is not possible to differentiate between an
225 alias and a host name or user name that consists solely of uppercase
226 letters, digits, and the underscore
230 \fB\-V\fR, \fB\--version\fR
235 grammar versions and exit.
239 file may be specified instead of the default,
240 \fI@sysconfdir@/sudoers\fR.
241 The lock file used is the specified
250 may be used to indicate that
252 will be read from the standard input.
253 Because the policy is evaluated in its entirety, it is not sufficient
254 to check an individual
256 include file for syntax errors.
257 .SS "Debugging and sudoers plugin arguments"
259 versions 1.8.4 and higher support a flexible debugging framework
260 that is configured via
263 sudo.conf(@mansectform@)
270 will also parse the arguments to the
272 plugin to override the default
274 path name, UID, GID and file mode.
275 These arguments, if present, should be listed after the path to the plugin
278 Multiple arguments may be specified, separated by white space.
283 Plugin sudoers_policy sudoers.so sudoers_mode=0400
287 The following arguments are supported:
289 sudoers_file=pathname
292 argument can be used to override the default path to the
299 argument can be used to override the default owner of the sudoers file.
300 It should be specified as a numeric user ID.
305 argument can be used to override the default group of the sudoers file.
306 It must be specified as a numeric group ID (not a group name).
311 argument can be used to override the default file mode for the sudoers file.
312 It should be specified as an octal value.
314 For more information on configuring
315 sudo.conf(@mansectform@),
316 please refer to its manual.
318 The following environment variables may be consulted depending on
348 \fI@sysconfdir@/sudo.conf\fR
349 Sudo front end configuration
351 \fI@sysconfdir@/sudoers\fR
352 List of who can run what
354 \fI@sysconfdir@/sudoers.tmp\fR
357 In addition to reporting
361 may produce the following messages:
363 \fRsudoers file busy, try again later.\fR
364 Someone else is currently editing the
368 \fR@sysconfdir@/sudoers.tmp: Permission denied\fR
373 \fRyou do not exist in the passwd database\fR
374 Your user ID does not appear in the system passwd database.
376 \fRWarning: {User,Runas,Host,Cmnd}_Alias referenced but not defined\fR
377 Either you are trying to use an undeclared {User,Runas,Host,Cmnd}_Alias
378 or you have a user or host name listed that consists solely of
379 uppercase letters, digits, and the underscore
382 In the latter case, you can ignore the warnings
386 The message is prefixed with the path name of the
388 file and the line number where the undefined alias was used.
391 (strict) mode these are errors, not warnings.
393 \fRWarning: unused {User,Runas,Host,Cmnd}_Alias\fR
394 The specified {User,Runas,Host,Cmnd}_Alias was defined but never
396 The message is prefixed with the path name of the
398 file and the line number where the unused alias was defined.
399 You may wish to comment out or remove the unused alias.
401 \fRWarning: cycle in {User,Runas,Host,Cmnd}_Alias\fR
402 The specified {User,Runas,Host,Cmnd}_Alias includes a reference to
403 itself, either directly or through an alias it includes.
404 The message is prefixed with the path name of the
406 file and the line number where the cycle was detected.
407 This is only a warning unless
413 will ignore cycles when parsing
418 \fRunknown defaults entry \&"name\&"\fR
423 setting not recognized by
427 sudo.conf(@mansectform@),
428 sudoers(@mansectform@),
432 Many people have worked on
434 over the years; this version consists of code written primarily by:
440 See the CONTRIBUTORS file in the
442 distribution (https://www.sudo.ws/contributors.html) for an
443 exhaustive list of people who have contributed to
446 There is no easy way to prevent a user from gaining a root shell if
449 allows shell escapes.
451 If you feel you have found a bug in
453 please submit a bug report at https://bugzilla.sudo.ws/
455 Limited free support is available via the sudo-users mailing list,
456 see https://www.sudo.ws/mailman/listinfo/sudo-users to subscribe or
462 and any express or implied warranties, including, but not limited
463 to, the implied warranties of merchantability and fitness for a
464 particular purpose are disclaimed.
465 See the LICENSE file distributed with
467 or https://www.sudo.ws/license.html for complete details.