=cut $Id$ =pod =head1 NAME visudo - edit the sudoers file =head1 SYNOPSIS B [ B<-V> ] =head1 DESCRIPTION B edits the I file in a safe fashion, analogous to vipw(8). B locks the I file against multiple simultaneous edits, provides basic sanity checks, and checks for parse errors. If the I file is currently being edited you will receive a message to try again later. In the default configuration, the vi(1) editor is used, but there is a compile time option to allow use of whatever editor the environmental variables C or C are set to. B parses the I 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 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 believes there to be a parse error, so will B and no one will be able to execute B again until the error is fixed. Any other command at this prompt will print a short help message. When editing the I 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 accepts the following command line option: =over 4 =item -V The C<-V> (version) option causes B to print the version number and exit. =back =head1 FILES /etc/sudoers file of authorized users. /etc/stmp lock file for visudo. =head1 ENVIRONMENT VARIABLES The following are used only if B was compiled with the I 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 over the years, this version of B was written by: Todd Miller 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 file, there is no way for B 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 allows shell escapes. =head1 BUGS The I<-V> flag gives the version of the I package rather than the individual B program. =head1 SEE ALSO sudo(8), vipw(8).