Annotation of src/usr.bin/sudo/visudo.8, Revision 1.1
1.1 ! millert 1: .rn '' }`
! 2: ''' $RCSfile: visudo.man,v $$Revision: 1.12 $$Date: 1999/11/16 05:42:28 $
! 3: '''
! 4: ''' $Log: visudo.man,v $
! 5: ''' Revision 1.12 1999/11/16 05:42:28 millert
! 6: ''' get rid of references to sudo-bugs. Now mention the web site or the sudo@ alias
! 7: '''
! 8: '''
! 9: .de Sh
! 10: .br
! 11: .if t .Sp
! 12: .ne 5
! 13: .PP
! 14: \fB\\$1\fR
! 15: .PP
! 16: ..
! 17: .de Sp
! 18: .if t .sp .5v
! 19: .if n .sp
! 20: ..
! 21: .de Ip
! 22: .br
! 23: .ie \\n(.$>=3 .ne \\$3
! 24: .el .ne 3
! 25: .IP "\\$1" \\$2
! 26: ..
! 27: .de Vb
! 28: .ft CW
! 29: .nf
! 30: .ne \\$1
! 31: ..
! 32: .de Ve
! 33: .ft R
! 34:
! 35: .fi
! 36: ..
! 37: '''
! 38: '''
! 39: ''' Set up \*(-- to give an unbreakable dash;
! 40: ''' string Tr holds user defined translation string.
! 41: ''' Bell System Logo is used as a dummy character.
! 42: '''
! 43: .tr \(*W-|\(bv\*(Tr
! 44: .ie n \{\
! 45: .ds -- \(*W-
! 46: .ds PI pi
! 47: .if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
! 48: .if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch
! 49: .ds L" ""
! 50: .ds R" ""
! 51: ''' \*(M", \*(S", \*(N" and \*(T" are the equivalent of
! 52: ''' \*(L" and \*(R", except that they are used on ".xx" lines,
! 53: ''' such as .IP and .SH, which do another additional levels of
! 54: ''' double-quote interpretation
! 55: .ds M" """
! 56: .ds S" """
! 57: .ds N" """""
! 58: .ds T" """""
! 59: .ds L' '
! 60: .ds R' '
! 61: .ds M' '
! 62: .ds S' '
! 63: .ds N' '
! 64: .ds T' '
! 65: 'br\}
! 66: .el\{\
! 67: .ds -- \(em\|
! 68: .tr \*(Tr
! 69: .ds L" ``
! 70: .ds R" ''
! 71: .ds M" ``
! 72: .ds S" ''
! 73: .ds N" ``
! 74: .ds T" ''
! 75: .ds L' `
! 76: .ds R' '
! 77: .ds M' `
! 78: .ds S' '
! 79: .ds N' `
! 80: .ds T' '
! 81: .ds PI \(*p
! 82: 'br\}
! 83: .\" If the F register is turned on, we'll generate
! 84: .\" index entries out stderr for the following things:
! 85: .\" TH Title
! 86: .\" SH Header
! 87: .\" Sh Subsection
! 88: .\" Ip Item
! 89: .\" X<> Xref (embedded
! 90: .\" Of course, you have to process the output yourself
! 91: .\" in some meaninful fashion.
! 92: .if \nF \{
! 93: .de IX
! 94: .tm Index:\\$1\t\\n%\t"\\$2"
! 95: ..
! 96: .nr % 0
! 97: .rr F
! 98: .\}
! 99: .TH visudo 8 "1.6" "15/Nov/1999" "MAINTENANCE COMMANDS"
! 100: .UC
! 101: .if n .hy 0
! 102: .if n .na
! 103: .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
! 104: .de CQ \" put $1 in typewriter font
! 105: .ft CW
! 106: 'if n "\c
! 107: 'if t \\&\\$1\c
! 108: 'if n \\&\\$1\c
! 109: 'if n \&"
! 110: \\&\\$2 \\$3 \\$4 \\$5 \\$6 \\$7
! 111: '.ft R
! 112: ..
! 113: .\" @(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2
! 114: . \" AM - accent mark definitions
! 115: .bd B 3
! 116: . \" fudge factors for nroff and troff
! 117: .if n \{\
! 118: . ds #H 0
! 119: . ds #V .8m
! 120: . ds #F .3m
! 121: . ds #[ \f1
! 122: . ds #] \fP
! 123: .\}
! 124: .if t \{\
! 125: . ds #H ((1u-(\\\\n(.fu%2u))*.13m)
! 126: . ds #V .6m
! 127: . ds #F 0
! 128: . ds #[ \&
! 129: . ds #] \&
! 130: .\}
! 131: . \" simple accents for nroff and troff
! 132: .if n \{\
! 133: . ds ' \&
! 134: . ds ` \&
! 135: . ds ^ \&
! 136: . ds , \&
! 137: . ds ~ ~
! 138: . ds ? ?
! 139: . ds ! !
! 140: . ds /
! 141: . ds q
! 142: .\}
! 143: .if t \{\
! 144: . ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
! 145: . ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
! 146: . ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
! 147: . ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
! 148: . ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
! 149: . ds ? \s-2c\h'-\w'c'u*7/10'\u\h'\*(#H'\zi\d\s+2\h'\w'c'u*8/10'
! 150: . ds ! \s-2\(or\s+2\h'-\w'\(or'u'\v'-.8m'.\v'.8m'
! 151: . ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
! 152: . ds q o\h'-\w'o'u*8/10'\s-4\v'.4m'\z\(*i\v'-.4m'\s+4\h'\w'o'u*8/10'
! 153: .\}
! 154: . \" troff and (daisy-wheel) nroff accents
! 155: .ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
! 156: .ds 8 \h'\*(#H'\(*b\h'-\*(#H'
! 157: .ds v \\k:\h'-(\\n(.wu*9/10-\*(#H)'\v'-\*(#V'\*(#[\s-4v\s0\v'\*(#V'\h'|\\n:u'\*(#]
! 158: .ds _ \\k:\h'-(\\n(.wu*9/10-\*(#H+(\*(#F*2/3))'\v'-.4m'\z\(hy\v'.4m'\h'|\\n:u'
! 159: .ds . \\k:\h'-(\\n(.wu*8/10)'\v'\*(#V*4/10'\z.\v'-\*(#V*4/10'\h'|\\n:u'
! 160: .ds 3 \*(#[\v'.2m'\s-2\&3\s0\v'-.2m'\*(#]
! 161: .ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
! 162: .ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
! 163: .ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
! 164: .ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
! 165: .ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
! 166: .ds ae a\h'-(\w'a'u*4/10)'e
! 167: .ds Ae A\h'-(\w'A'u*4/10)'E
! 168: .ds oe o\h'-(\w'o'u*4/10)'e
! 169: .ds Oe O\h'-(\w'O'u*4/10)'E
! 170: . \" corrections for vroff
! 171: .if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
! 172: .if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
! 173: . \" for low resolution devices (crt and lpr)
! 174: .if \n(.H>23 .if \n(.V>19 \
! 175: \{\
! 176: . ds : e
! 177: . ds 8 ss
! 178: . ds v \h'-1'\o'\(aa\(ga'
! 179: . ds _ \h'-1'^
! 180: . ds . \h'-1'.
! 181: . ds 3 3
! 182: . ds o a
! 183: . ds d- d\h'-1'\(ga
! 184: . ds D- D\h'-1'\(hy
! 185: . ds th \o'bp'
! 186: . ds Th \o'LP'
! 187: . ds ae ae
! 188: . ds Ae AE
! 189: . ds oe oe
! 190: . ds Oe OE
! 191: .\}
! 192: .rm #[ #] #H #V #F C
! 193: .SH "NAME"
! 194: visudo \- edit the sudoers file
! 195: .SH "SYNOPSIS"
! 196: \fBvisudo\fR [ \fB\-s\fR ] [ \fB\-V\fR ]
! 197: .SH "DESCRIPTION"
! 198: \fBvisudo\fR edits the \fIsudoers\fR file in a safe fashion, analogous to
! 199: \fIvipw\fR\|(8). \fBvisudo\fR locks the \fIsudoers\fR file against multiple
! 200: simultaneous edits, provides basic sanity checks, and checks
! 201: for parse errors. If the \fIsudoers\fR file is currently being
! 202: edited you will receive a message to try again later. In the
! 203: default configuration, the \fIvi\fR\|(1) editor is used, but there is
! 204: a compile time option to allow use of whatever editor the
! 205: environment variables \f(CWEDITOR\fR or \f(CWVISUAL\fR are set to.
! 206: .PP
! 207: \fBvisudo\fR parses the \fIsudoers\fR file after the edit and will
! 208: not save the changes if there is a syntax error. Upon finding
! 209: an error, a message will be printed stating the line \fInumber\fR\|(s)
! 210: that the error occurred on and the user will receive the
! 211: \*(L"What now?\*(R" prompt. At this point the user may enter \*(L"e\*(R"
! 212: to re-edit the \fIsudoers\fR file, enter \*(L"x\*(R" to exit without
! 213: saving the changes, or \*(L"Q\*(R" to quit and save changes. The
! 214: \*(L"Q\*(R" option should be used with extreme care because if \fBvisudo\fR
! 215: believes there to be a parse error, so will \fBsudo\fR and no one
! 216: will be able to execute \fBsudo\fR again until the error is fixed.
! 217: Any other command at this prompt will print a short help message.
! 218: When editing the \fIsudoers\fR file after a parse error has been
! 219: detected the cursor will be placed on the line where the error
! 220: occurred (if the editor supports this feature).
! 221: .SH "OPTIONS"
! 222: \fBvisudo\fR accepts the following command line option:
! 223: .Ip "-s" 4
! 224: Enable \fBstrict\fR checking of the \fIsudoers\fR file. If an alias is
! 225: used before it is defined, \fBvisudo\fR will consider this a parse
! 226: error. Note that it is not possible to differentiate between an
! 227: alias and a hostname or username that consists solely of upper case
! 228: letters, digits, and the underscore ('_') character.
! 229: .Ip "-V" 4
! 230: The \f(CW-V\fR (version) option causes \fBvisudo\fR to print the version number
! 231: and exit.
! 232: .SH "ERRORS"
! 233: .Ip "sudoers file busy, try again later." 4
! 234: Someone else is currently editing the \fIsudoers\fR file.
! 235: .Ip "/etc/sudoers.tmp: Permission denied" 4
! 236: You didn't run \fBvisudo\fR as root.
! 237: .Ip "Can't find you in the passwd database" 4
! 238: Your userid does not appear in the system passwd file.
! 239: .Ip "Warning: undeclared Alias referenced near ..." 4
! 240: Either you are using a {User,Runas,Host,Cmnd}_Alias before
! 241: defining it or you have a user or hostname listed that
! 242: consists solely of upper case letters, digits, and the
! 243: underscore ('_') character. If the latter, you can ignore
! 244: the warnings (\fBsudo\fR will not complain). In \fB\-s\fR (strict)
! 245: mode these are errors not warnings.
! 246: .SH "ENVIRONMENT"
! 247: The following environment variables are used only if \fBvisudo\fR
! 248: was configured with the \fI--with-env-editor\fR option:
! 249: .Sp
! 250: .Vb 2
! 251: \& EDITOR Used by visudo as the editor to use
! 252: \& VISUAL Used by visudo if EDITOR is not set
! 253: .Ve
! 254: .SH "FILES"
! 255: .Sp
! 256: .Vb 2
! 257: \& /etc/sudoers List of who can run what
! 258: \& /etc/sudoers.tmp Lock file for visudo
! 259: .Ve
! 260: .SH "AUTHOR"
! 261: Many people have worked on \fIsudo\fR over the years, this version of
! 262: \fBvisudo\fR was written by:
! 263: .Sp
! 264: .Vb 1
! 265: \& Todd Miller <Todd.Miller@courtesan.com>
! 266: .Ve
! 267: See the HISTORY file in the sudo distribution for more details.
! 268: .SH "BUGS"
! 269: If you feel you have found a bug in sudo, please submit a bug report
! 270: at http://www.courtesan.com/sudo/bugs/.
! 271: .SH "DISCLAIMER"
! 272: \fBVisudo\fR is provided ``AS IS'\*(R' and any express or implied warranties,
! 273: including, but not limited to, the implied warranties of merchantability
! 274: and fitness for a particular purpose are disclaimed.
! 275: See the LICENSE file distributed with \fBsudo\fR for complete details.
! 276: .SH "CAVEATS"
! 277: There is no easy way to prevent a user from gaining a root shell if
! 278: the editor used by \fBvisudo\fR allows shell escapes.
! 279: .SH "SEE ALSO"
! 280: \fIsudo\fR\|(8), \fIvipw\fR\|(8).
! 281:
! 282: .rn }` ''
! 283: .IX Title "visudo 8"
! 284: .IX Name "visudo - edit the sudoers file"
! 285:
! 286: .IX Header "NAME"
! 287:
! 288: .IX Header "SYNOPSIS"
! 289:
! 290: .IX Header "DESCRIPTION"
! 291:
! 292: .IX Header "OPTIONS"
! 293:
! 294: .IX Item "-s"
! 295:
! 296: .IX Item "-V"
! 297:
! 298: .IX Header "ERRORS"
! 299:
! 300: .IX Item "sudoers file busy, try again later."
! 301:
! 302: .IX Item "/etc/sudoers.tmp: Permission denied"
! 303:
! 304: .IX Item "Can't find you in the passwd database"
! 305:
! 306: .IX Item "Warning: undeclared Alias referenced near ..."
! 307:
! 308: .IX Header "ENVIRONMENT"
! 309:
! 310: .IX Header "FILES"
! 311:
! 312: .IX Header "AUTHOR"
! 313:
! 314: .IX Header "BUGS"
! 315:
! 316: .IX Header "DISCLAIMER"
! 317:
! 318: .IX Header "CAVEATS"
! 319:
! 320: .IX Header "SEE ALSO"
! 321: