-=cut
-Copyright (c) 1996,1998-2005, 2007 Todd C. Miller <Todd.Miller@courtesan.com>
+Copyright (c) 1996,1998-2005, 2007-2010
+ Todd C. Miller <Todd.Miller@courtesan.com>
Permission to use, copy, modify, and distribute this software for any
purpose with or without fee is hereby granted, provided that the above
Agency (DARPA) and Air Force Research Laboratory, Air Force
Materiel Command, USAF, under agreement number F39502-99-1-0512.
-$Sudo: visudo.pod,v 1.38.2.9 2007/08/13 16:23:31 millert Exp $
=pod
=head1 NAME
for parse errors. If the I<sudoers> file is currently being
edited you will receive a message to try again later.
-There is a hard-coded list of editors that B<visudo> will use set
-at compile-time that may be overridden via the I<editor> I<sudoers>
-C<Default> variable. This list defaults to the path to L<vi(1)> on
-your system, as determined by the I<configure> script. Normally,
+There is a hard-coded list of one or more editors that B<visudo> will
+use set at compile-time that may be overridden via the I<editor> I<sudoers>
+C<Default> variable. This list defaults to C<"@editor@">. Normally,
B<visudo> does not honor the C<VISUAL> or C<EDITOR> environment
variables unless they contain an editor in the aforementioned editors
-list. However, if B<visudo> is configured with the I<--with-enveditor>
-flag or the I<env_editor> C<Default> variable is set in I<sudoers>,
+list. However, if B<visudo> is configured with the I<--with-env-editor>
+option or the I<env_editor> C<Default> variable is set in I<sudoers>,
B<visudo> will use any the editor defines by C<VISUAL> or C<EDITOR>.
Note that this can be a security hole since it allows the user to
execute any program they wish simply by setting C<VISUAL> or C<EDITOR>.
B<visudo> accepts the following command line options:
-=over 4
+=over 12
=item -c
exit with a value of 0. If a syntax error is encountered,
B<visudo> will exit with a value of 1.
-=item -f
+=item -f I<sudoers>
Specify and alternate I<sudoers> file location. With this option
B<visudo> will edit (or check) the I<sudoers> file of your choice,
Enable B<quiet> mode. In this mode details about syntax errors
are not printed. This option is only useful when combined with
-the B<-c> flag.
+the B<-c> option.
=item -s
Enable B<strict> checking of the I<sudoers> file. If an alias is
used before it is defined, B<visudo> will consider this a parse
error. Note that it is not possible to differentiate between an
-alias and a hostname or username that consists solely of uppercase
+alias and a host name or user name that consists solely of uppercase
letters, digits, and the underscore ('_') character.
=item -V
=head1 ENVIRONMENT
-The following environment variables are used only if B<visudo>
-was configured with the I<--with-env-editor> option:
+The following environment variables may be consulted depending on
+the value of the I<editor> and I<env_editor> I<sudoers> variables:
=over 16
=head1 FILES
-=over 4
+=over 24
+
+=item F<@sysconfdir@/sudoers>
+
+List of who can run what
-=item F<@sysconfdir@/sudoers>C< >List of who can run what
+=item F<@sysconfdir@/sudoers.tmp>
-=item F<@sysconfdir@/sudoers.tmp>C< >Lock file for visudo
+Lock file for visudo
=back
Your userid does not appear in the system passwd file.
-=item Warning: undeclared Alias referenced near ...
-
-Either you are using a {User,Runas,Host,Cmnd}_Alias before
-defining it or you have a user or hostname listed that
-consists solely of uppercase letters, digits, and the
-underscore ('_') character. If the latter, you can ignore
-the warnings (B<sudo> will not complain). In B<-s> (strict)
-mode these are errors, not warnings.
-
-=item Warning: runas_default set after old value is in use ...
-
-You have a I<runas_default> Defaults setting listed in the I<sudoers>
-file after its value has already been used. This means that entries
-prior to the I<runas_default> setting will match based on the default
-value of I<runas_default> (C<@runas_default@>) whereas entries
-B<after> the I<runas_default> setting will match based on the new
-value. This is usually unintentional and in most cases the
-<runas_default> setting should be placed before any C<Runas_Alias>
-or User specifications. In B<-s> (strict) mode this is an error,
-not a warning.
+=item Warning: {User,Runas,Host,Cmnd}_Alias referenced but not defined
+
+Either you are trying to use an undeclare {User,Runas,Host,Cmnd}_Alias
+or you have a user or host name listed that consists solely of
+uppercase letters, digits, and the underscore ('_') character. In
+the latter case, you can ignore the warnings (B<sudo> will not
+complain). In B<-s> (strict) mode these are errors, not warnings.
+
+=item Warning: unused {User,Runas,Host,Cmnd}_Alias
+
+The specified {User,Runas,Host,Cmnd}_Alias was defined but never
+used. You may wish to comment out or remove the unused alias. In
+B<-s> (strict) mode this is an error, not a warning.
=back