File: visudo.pod

package info (click to toggle)
sudo 1.5.6p2-2
  • links: PTS
  • area: main
  • in suites: slink
  • size: 972 kB
  • ctags: 874
  • sloc: ansic: 6,036; sh: 1,608; makefile: 209; perl: 47
file content (121 lines) | stat: -rw-r--r-- 3,578 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
=cut
$Id: visudo.pod,v 1.7 1998/02/17 00:06:03 millert Exp $
=pod

=head1 NAME

visudo - edit the sudoers file

=head1 SYNOPSIS

B<visudo> [ B<-V> ]

=head1 DESCRIPTION

B<visudo> edits the I<sudoers> file in a safe fashion, analogous to
vipw(8).  B<visudo> locks the I<sudoers> file against multiple
simultaneous edits, provides basic sanity checks, and checks
for parse errors.  If the I<sudoers> file is currently being
edited you will receive a message to try again later.  In the
default configuration, the system default editor /usr/bin/editor is used, 
but there is a compile time option to allow use of whatever editor the
environmental variables C<EDITOR> or C<VISUAL> are set to.

B<visudo> parses the I<sudoers> file after the edit and will
not save the changes if there is a syntax error.  Upon finding
an error, a message will be printed stating the line number(s)
that the error occurred on and the user will receive the
"What now?" prompt.  At this point the user may enter "e"
to re-edit the I<sudoers> file, enter "x" to exit without
saving the changes, or "Q" to quit and save changes.  The
"Q" option should be used with extreme care because if B<visudo>
believes there to be a parse error, so will B<sudo> and no one
will be able to execute B<sudo> again until the error is fixed.
Any other command at this prompt will print a short help message.
When editing the I<sudoers> file after a parse error has been
detected the cursor will be placed on the line where the error
occurred (if the editor supports this feature).

=head1 OPTIONS

B<visudo> accepts the following command line option:

=over 4

=item -V

The C<-V> (version) option causes B<visudo> to print the version number
and exit.

=back

=head1 ERRORS

=over 4

=item sudoers file busy, try again later.

Either someone is currently editing the I<sudoers> file
or there is a stale sudoers lock file (/etc/stmp by default)
that you need to delete.

= item /etc/stmp: Permission denied

You didn't run B<visudo> as root.

= item Can't find you in the passwd database

Your userid does not appear in the passwd file.

=head1 FILES

 /etc/sudoers		file of authorized users.
 /etc/stmp		lock file for visudo.

=head1 ENVIRONMENT VARIABLES

The following are used only if B<visudo> was compiled with the
I<ENV_EDITOR> option:

 EDITOR			Used by visudo as the editor to use.
 VISUAL			Used by visudo if EDITOR is not set.

=head1 AUTHOR

Many people have worked on I<sudo> over the years, this version of
B<visudo> was written by:

 Todd Miller		<Todd.Miller@courtesan.com>

See the HISTORY file in the sudo distribution for more details.

Please send all bugs, comments, and changes to sudo-bugs@courtesan.com.

=head1 DISCLAIMER

This program is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
General Public License for more details.

You should have received a copy of the GNU General Public License along
with this program; if not, write to the Free Software Foundation, Inc.,
675 Mass Ave, Cambridge, MA 02139, USA.

=head1 CAVEATS

Due to the syntax of the I<sudoers> file, there is no way
for B<visudo> to tell the difference between a mistyped
{Host,User,Cmnd}_Alias and a user or host name.

There is no easy way to prevent a user from gaining a root shell if 
the editor used by B<visudo> allows shell escapes.

=head1 BUGS

The I<-V> flag gives the version of the I<sudo> package rather than
the individual B<visudo> program.

=head1 SEE ALSO

sudo(8), vipw(8).