~ubuntu-branches/ubuntu/oneiric/sudo/oneiric-updates

1.4.5 by Bdale Garbee
Import upstream version 1.7.4p4
1
.\" Copyright (c) 1996,1998-2005, 2007-2010
1.2.7 by Bdale Garbee
Import upstream version 1.7.0
2
.\" 	Todd C. Miller <Todd.Miller@courtesan.com>
1.1.1 by Thom May
Import upstream version 1.6.8p5
3
.\" 
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.
7
.\" 
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.
1 by Thom May
Import upstream version 1.6.7p5
15
.\" ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
1.1.1 by Thom May
Import upstream version 1.6.8p5
16
.\" 
1 by Thom May
Import upstream version 1.6.7p5
17
.\" Sponsored in part by the Defense Advanced Research Projects
18
.\" Agency (DARPA) and Air Force Research Laboratory, Air Force
19
.\" Materiel Command, USAF, under agreement number F39502-99-1-0512.
20
.\" 
1.4.3 by Bdale Garbee
Import upstream version 1.7.2p6
21
.\" Automatically generated by Pod::Man 2.22 (Pod::Simple 3.07)
1 by Thom May
Import upstream version 1.6.7p5
22
.\"
23
.\" Standard preamble:
24
.\" ========================================================================
25
.de Sp \" Vertical space (when we can't use .PP)
26
.if t .sp .5v
27
.if n .sp
28
..
29
.de Vb \" Begin verbatim text
30
.ft CW
31
.nf
32
.ne \\$1
33
..
34
.de Ve \" End verbatim text
35
.ft R
36
.fi
37
..
38
.\" Set up some character translations and predefined strings.  \*(-- will
39
.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
1.2.7 by Bdale Garbee
Import upstream version 1.7.0
40
.\" double quote, and \*(R" will give a right double quote.  \*(C+ will
41
.\" give a nicer C++.  Capital omega is used to do unbreakable dashes and
42
.\" therefore won't be available.  \*(C` and \*(C' expand to `' in nroff,
43
.\" nothing in troff, for use with C<>.
44
.tr \(*W-
1 by Thom May
Import upstream version 1.6.7p5
45
.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
46
.ie n \{\
47
.    ds -- \(*W-
48
.    ds PI pi
49
.    if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
50
.    if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\"  diablo 12 pitch
51
.    ds L" ""
52
.    ds R" ""
53
.    ds C` 
54
.    ds C' 
55
'br\}
56
.el\{\
57
.    ds -- \|\(em\|
58
.    ds PI \(*p
59
.    ds L" ``
60
.    ds R" ''
61
'br\}
62
.\"
1.2.7 by Bdale Garbee
Import upstream version 1.7.0
63
.\" Escape single quotes in literal strings from groff's Unicode transform.
64
.ie \n(.g .ds Aq \(aq
65
.el       .ds Aq '
66
.\"
1 by Thom May
Import upstream version 1.6.7p5
67
.\" If the F register is turned on, we'll generate index entries on stderr for
1.4.3 by Bdale Garbee
Import upstream version 1.7.2p6
68
.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index
1 by Thom May
Import upstream version 1.6.7p5
69
.\" entries marked with X<> in POD.  Of course, you'll have to process the
70
.\" output yourself in some meaningful fashion.
1.2.7 by Bdale Garbee
Import upstream version 1.7.0
71
.ie \nF \{\
1 by Thom May
Import upstream version 1.6.7p5
72
.    de IX
73
.    tm Index:\\$1\t\\n%\t"\\$2"
74
..
75
.    nr % 0
76
.    rr F
77
.\}
1.2.7 by Bdale Garbee
Import upstream version 1.7.0
78
.el \{\
79
.    de IX
80
..
81
.\}
1 by Thom May
Import upstream version 1.6.7p5
82
.\"
83
.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
84
.\" Fear.  Run.  Save yourself.  No user-serviceable parts.
85
.    \" fudge factors for nroff and troff
86
.if n \{\
87
.    ds #H 0
88
.    ds #V .8m
89
.    ds #F .3m
90
.    ds #[ \f1
91
.    ds #] \fP
92
.\}
93
.if t \{\
94
.    ds #H ((1u-(\\\\n(.fu%2u))*.13m)
95
.    ds #V .6m
96
.    ds #F 0
97
.    ds #[ \&
98
.    ds #] \&
99
.\}
100
.    \" simple accents for nroff and troff
101
.if n \{\
102
.    ds ' \&
103
.    ds ` \&
104
.    ds ^ \&
105
.    ds , \&
106
.    ds ~ ~
107
.    ds /
108
.\}
109
.if t \{\
110
.    ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
111
.    ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
112
.    ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
113
.    ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
114
.    ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
115
.    ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
116
.\}
117
.    \" troff and (daisy-wheel) nroff accents
118
.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
119
.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
120
.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
121
.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
122
.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
123
.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
124
.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
125
.ds ae a\h'-(\w'a'u*4/10)'e
126
.ds Ae A\h'-(\w'A'u*4/10)'E
127
.    \" corrections for vroff
128
.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
129
.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
130
.    \" for low resolution devices (crt and lpr)
131
.if \n(.H>23 .if \n(.V>19 \
132
\{\
133
.    ds : e
134
.    ds 8 ss
135
.    ds o a
136
.    ds d- d\h'-1'\(ga
137
.    ds D- D\h'-1'\(hy
138
.    ds th \o'bp'
139
.    ds Th \o'LP'
140
.    ds ae ae
141
.    ds Ae AE
142
.\}
143
.rm #[ #] #H #V #F C
144
.\" ========================================================================
145
.\"
146
.IX Title "VISUDO @mansectsu@"
1.4.5 by Bdale Garbee
Import upstream version 1.7.4p4
147
.TH VISUDO @mansectsu@ "July 14, 2010" "1.7.4" "MAINTENANCE COMMANDS"
1.2.7 by Bdale Garbee
Import upstream version 1.7.0
148
.\" For nroff, turn off justification.  Always turn off hyphenation; it makes
149
.\" way too many mistakes in technical documents.
150
.if n .ad l
151
.nh
1 by Thom May
Import upstream version 1.6.7p5
152
.SH "NAME"
153
visudo \- edit the sudoers file
154
.SH "SYNOPSIS"
155
.IX Header "SYNOPSIS"
1.2.1 by Martin Pitt
Import upstream version 1.6.9p6
156
\&\fBvisudo\fR [\fB\-c\fR] [\fB\-q\fR] [\fB\-s\fR] [\fB\-V\fR] [\fB\-f\fR \fIsudoers\fR]
1 by Thom May
Import upstream version 1.6.7p5
157
.SH "DESCRIPTION"
158
.IX Header "DESCRIPTION"
159
\&\fBvisudo\fR edits the \fIsudoers\fR file in a safe fashion, analogous to
1.2.1 by Martin Pitt
Import upstream version 1.6.9p6
160
\&\fIvipw\fR\|(@mansectsu@).  \fBvisudo\fR locks the \fIsudoers\fR file against multiple
1 by Thom May
Import upstream version 1.6.7p5
161
simultaneous edits, provides basic sanity checks, and checks
162
for parse errors.  If the \fIsudoers\fR file is currently being
163
edited you will receive a message to try again later.
164
.PP
1.4.5 by Bdale Garbee
Import upstream version 1.7.4p4
165
There is a hard-coded list of one or more editors that \fBvisudo\fR will
166
use set at compile-time that may be overridden via the \fIeditor\fR \fIsudoers\fR
167
\&\f(CW\*(C`Default\*(C'\fR variable.  This list defaults to \f(CW"@editor@"\fR.  Normally,
1.1.1 by Thom May
Import upstream version 1.6.8p5
168
\&\fBvisudo\fR does not honor the \f(CW\*(C`VISUAL\*(C'\fR or \f(CW\*(C`EDITOR\*(C'\fR environment
1 by Thom May
Import upstream version 1.6.7p5
169
variables unless they contain an editor in the aforementioned editors
1.4.5 by Bdale Garbee
Import upstream version 1.7.4p4
170
list.  However, if \fBvisudo\fR is configured with the \fI\-\-with\-env\-editor\fR
1.2.7 by Bdale Garbee
Import upstream version 1.7.0
171
option or the \fIenv_editor\fR \f(CW\*(C`Default\*(C'\fR variable is set in \fIsudoers\fR,
1.1.1 by Thom May
Import upstream version 1.6.8p5
172
\&\fBvisudo\fR will use any the editor defines by \f(CW\*(C`VISUAL\*(C'\fR or \f(CW\*(C`EDITOR\*(C'\fR.
1 by Thom May
Import upstream version 1.6.7p5
173
Note that this can be a security hole since it allows the user to
1.1.1 by Thom May
Import upstream version 1.6.8p5
174
execute any program they wish simply by setting \f(CW\*(C`VISUAL\*(C'\fR or \f(CW\*(C`EDITOR\*(C'\fR.
1 by Thom May
Import upstream version 1.6.7p5
175
.PP
176
\&\fBvisudo\fR parses the \fIsudoers\fR file after the edit and will
177
not save the changes if there is a syntax error.  Upon finding
178
an error, \fBvisudo\fR will print a message stating the line number(s)
179
where the error occurred and the user will receive the
180
\&\*(L"What now?\*(R" prompt.  At this point the user may enter \*(L"e\*(R"
181
to re-edit the \fIsudoers\fR file, \*(L"x\*(R" to exit without
182
saving the changes, or \*(L"Q\*(R" to quit and save changes.  The
183
\&\*(L"Q\*(R" option should be used with extreme care because if \fBvisudo\fR
184
believes there to be a parse error, so will \fBsudo\fR and no one
185
will be able to \fBsudo\fR again until the error is fixed.
186
If \*(L"e\*(R" is typed to edit the  \fIsudoers\fR file after a parse error
187
has been detected, the cursor will be placed on the line where the
188
error occurred (if the editor supports this feature).
189
.SH "OPTIONS"
190
.IX Header "OPTIONS"
191
\&\fBvisudo\fR accepts the following command line options:
1.2.7 by Bdale Garbee
Import upstream version 1.7.0
192
.IP "\-c" 12
1 by Thom May
Import upstream version 1.6.7p5
193
.IX Item "-c"
194
Enable \fBcheck-only\fR mode.  The existing \fIsudoers\fR file will be
195
checked for syntax and a message will be printed to the
196
standard output detailing the status of \fIsudoers\fR.
197
If the syntax check completes successfully, \fBvisudo\fR will
198
exit with a value of 0.  If a syntax error is encountered,
199
\&\fBvisudo\fR will exit with a value of 1.
1.2.7 by Bdale Garbee
Import upstream version 1.7.0
200
.IP "\-f \fIsudoers\fR" 12
201
.IX Item "-f sudoers"
1 by Thom May
Import upstream version 1.6.7p5
202
Specify and alternate \fIsudoers\fR file location.  With this option
203
\&\fBvisudo\fR will edit (or check) the \fIsudoers\fR file of your choice,
1.2.8 by Bdale Garbee
Import upstream version 1.7.2
204
instead of the default, \fI@sysconfdir@/sudoers\fR.  The lock file used
1 by Thom May
Import upstream version 1.6.7p5
205
is the specified \fIsudoers\fR file with \*(L".tmp\*(R" appended to it.
1.2.7 by Bdale Garbee
Import upstream version 1.7.0
206
.IP "\-q" 12
1 by Thom May
Import upstream version 1.6.7p5
207
.IX Item "-q"
208
Enable \fBquiet\fR mode.  In this mode details about syntax errors
209
are not printed.  This option is only useful when combined with
1.2.7 by Bdale Garbee
Import upstream version 1.7.0
210
the \fB\-c\fR option.
211
.IP "\-s" 12
1 by Thom May
Import upstream version 1.6.7p5
212
.IX Item "-s"
213
Enable \fBstrict\fR checking of the \fIsudoers\fR file.  If an alias is
214
used before it is defined, \fBvisudo\fR will consider this a parse
215
error.  Note that it is not possible to differentiate between an
1.4.5 by Bdale Garbee
Import upstream version 1.7.4p4
216
alias and a host name or user name that consists solely of uppercase
1 by Thom May
Import upstream version 1.6.7p5
217
letters, digits, and the underscore ('_') character.
1.2.7 by Bdale Garbee
Import upstream version 1.7.0
218
.IP "\-V" 12
1 by Thom May
Import upstream version 1.6.7p5
219
.IX Item "-V"
220
The \fB\-V\fR (version) option causes \fBvisudo\fR to print its version number
221
and exit.
1.1.1 by Thom May
Import upstream version 1.6.8p5
222
.SH "ENVIRONMENT"
223
.IX Header "ENVIRONMENT"
1.2.7 by Bdale Garbee
Import upstream version 1.7.0
224
The following environment variables may be consulted depending on
225
the value of the \fIeditor\fR and \fIenv_editor\fR \fIsudoers\fR variables:
1.2.1 by Martin Pitt
Import upstream version 1.6.9p6
226
.ie n .IP "\*(C`VISUAL\*(C'" 16
227
.el .IP "\f(CW\*(C`VISUAL\*(C'\fR" 16
228
.IX Item "VISUAL"
229
Invoked by visudo as the editor to use
230
.ie n .IP "\*(C`EDITOR\*(C'" 16
231
.el .IP "\f(CW\*(C`EDITOR\*(C'\fR" 16
232
.IX Item "EDITOR"
233
Used by visudo if \s-1VISUAL\s0 is not set
1.1.1 by Thom May
Import upstream version 1.6.8p5
234
.SH "FILES"
235
.IX Header "FILES"
1.2.8 by Bdale Garbee
Import upstream version 1.7.2
236
.ie n .IP "\fI@sysconfdir@/sudoers\fR" 24
237
.el .IP "\fI@sysconfdir@/sudoers\fR" 24
1.2.5 by Martin Pitt
Import upstream version 1.6.9p15
238
.IX Item "@sysconfdir@/sudoers"
239
List of who can run what
1.2.8 by Bdale Garbee
Import upstream version 1.7.2
240
.ie n .IP "\fI@sysconfdir@/sudoers.tmp\fR" 24
241
.el .IP "\fI@sysconfdir@/sudoers.tmp\fR" 24
1.2.5 by Martin Pitt
Import upstream version 1.6.9p15
242
.IX Item "@sysconfdir@/sudoers.tmp"
243
Lock file for visudo
1.1.1 by Thom May
Import upstream version 1.6.8p5
244
.SH "DIAGNOSTICS"
245
.IX Header "DIAGNOSTICS"
1 by Thom May
Import upstream version 1.6.7p5
246
.IP "sudoers file busy, try again later." 4
247
.IX Item "sudoers file busy, try again later."
248
Someone else is currently editing the \fIsudoers\fR file.
1.2.7 by Bdale Garbee
Import upstream version 1.7.0
249
.ie n .IP "@sysconfdir@/sudoers.tmp: Permission denied" 4
250
.el .IP "\f(CW@sysconfdir\fR@/sudoers.tmp: Permission denied" 4
1 by Thom May
Import upstream version 1.6.7p5
251
.IX Item "@sysconfdir@/sudoers.tmp: Permission denied"
252
You didn't run \fBvisudo\fR as root.
253
.IP "Can't find you in the passwd database" 4
254
.IX Item "Can't find you in the passwd database"
255
Your userid does not appear in the system passwd file.
1.2.7 by Bdale Garbee
Import upstream version 1.7.0
256
.IP "Warning: {User,Runas,Host,Cmnd}_Alias referenced but not defined" 4
257
.IX Item "Warning: {User,Runas,Host,Cmnd}_Alias referenced but not defined"
258
Either you are trying to use an undeclare {User,Runas,Host,Cmnd}_Alias
1.4.5 by Bdale Garbee
Import upstream version 1.7.4p4
259
or you have a user or host name listed that consists solely of
1.2.7 by Bdale Garbee
Import upstream version 1.7.0
260
uppercase letters, digits, and the underscore ('_') character.  In
261
the latter case, you can ignore the warnings (\fBsudo\fR will not
262
complain).  In \fB\-s\fR (strict) mode these are errors, not warnings.
263
.IP "Warning: unused {User,Runas,Host,Cmnd}_Alias" 4
264
.IX Item "Warning: unused {User,Runas,Host,Cmnd}_Alias"
265
The specified {User,Runas,Host,Cmnd}_Alias was defined but never
266
used.  You may wish to comment out or remove the unused alias.  In
267
\&\fB\-s\fR (strict) mode this is an error, not a warning.
1.1.1 by Thom May
Import upstream version 1.6.8p5
268
.SH "SEE ALSO"
269
.IX Header "SEE ALSO"
1.2.1 by Martin Pitt
Import upstream version 1.6.9p6
270
\&\fIvi\fR\|(1), \fIsudoers\fR\|(@mansectform@), \fIsudo\fR\|(@mansectsu@), \fIvipw\fR\|(8)
1 by Thom May
Import upstream version 1.6.7p5
271
.SH "AUTHOR"
272
.IX Header "AUTHOR"
273
Many people have worked on \fIsudo\fR over the years; this version of
274
\&\fBvisudo\fR was written by:
275
.PP
276
.Vb 1
1.1.1 by Thom May
Import upstream version 1.6.8p5
277
\& Todd Miller
1 by Thom May
Import upstream version 1.6.7p5
278
.Ve
279
.PP
280
See the \s-1HISTORY\s0 file in the sudo distribution or visit
281
http://www.sudo.ws/sudo/history.html for more details.
1.1.1 by Thom May
Import upstream version 1.6.8p5
282
.SH "CAVEATS"
283
.IX Header "CAVEATS"
284
There is no easy way to prevent a user from gaining a root shell if 
285
the editor used by \fBvisudo\fR allows shell escapes.
1 by Thom May
Import upstream version 1.6.7p5
286
.SH "BUGS"
287
.IX Header "BUGS"
1.1.1 by Thom May
Import upstream version 1.6.8p5
288
If you feel you have found a bug in \fBvisudo\fR, please submit a bug report
1 by Thom May
Import upstream version 1.6.7p5
289
at http://www.sudo.ws/sudo/bugs/
1.1.1 by Thom May
Import upstream version 1.6.8p5
290
.SH "SUPPORT"
291
.IX Header "SUPPORT"
292
Limited free support is available via the sudo-users mailing list,
293
see http://www.sudo.ws/mailman/listinfo/sudo\-users to subscribe or
294
search the archives.
1 by Thom May
Import upstream version 1.6.7p5
295
.SH "DISCLAIMER"
296
.IX Header "DISCLAIMER"
1.2.1 by Martin Pitt
Import upstream version 1.6.9p6
297
\&\fBvisudo\fR is provided ``\s-1AS\s0 \s-1IS\s0'' and any express or implied warranties,
1 by Thom May
Import upstream version 1.6.7p5
298
including, but not limited to, the implied warranties of merchantability
1.1.1 by Thom May
Import upstream version 1.6.8p5
299
and fitness for a particular purpose are disclaimed.  See the \s-1LICENSE\s0
300
file distributed with \fBsudo\fR or http://www.sudo.ws/sudo/license.html
301
for complete details.