TEXT   61

visudo.txt

Guest on 4th August 2021 01:42:26 AM

  1.  
  2.  visudo(8)                                             visudo(8)
  3.  MAINTENANCE COMMANDS                                   MAINTENANCE COMMANDS
  4.  
  5.                                     1.5.7
  6.  
  7.  NAME
  8.       visudo - edit the sudoers file
  9.  
  10.  SYNOPSIS
  11.       visudo [ -V ]
  12.  
  13.  DESCRIPTION
  14.       visudo edits the sudoers file in a safe fashion, analogous to vipw(8).
  15.       visudo locks the sudoers file against multiple simultaneous edits,
  16.       provides basic sanity checks, and checks for parse errors.  If the
  17.       sudoers file is currently being edited you will receive a message to
  18.       try again later.  In the default configuration, the vi(1) editor is
  19.       used, but there is a compile time option to allow use of whatever
  20.       editor the environment variables EDITOR or VISUAL are set to.
  21.  
  22.       visudo parses the sudoers file after the edit and will not save the
  23.       changes if there is a syntax error.  Upon finding an error, a message
  24.       will be printed stating the line number(s) that the error occurred on
  25.       and the user will receive the "What now?" prompt.  At this point the
  26.       user may enter "e" to re-edit the sudoers file, enter "x" to exit
  27.       without saving the changes, or "Q" to quit and save changes.  The "Q"
  28.       option should be used with extreme care because if visudo believes
  29.       there to be a parse error, so will sudo and no one will be able to
  30.       execute sudo again until the error is fixed.  Any other command at
  31.       this prompt will print a short help message.  When editing the sudoers
  32.       file after a parse error has been detected the cursor will be placed
  33.       on the line where the error occurred (if the editor supports this
  34.       feature).
  35.  
  36.  OPTIONS
  37.       visudo accepts the following command line option:
  38.  
  39.       -V  The -V (version) option causes visudo to print the version number
  40. ...skipping...
  41.  
  42.       visudo parses the sudoers file after the edit and will not save the
  43.       changes if there is a syntax error.  Upon finding an error, a message
  44.       will be printed stating the line number(s) that the error occurred on
  45.       and the user will receive the "What now?" prompt.  At this point the
  46.       user may enter "e" to re-edit the sudoers file, enter "x" to exit
  47.       without saving the changes, or "Q" to quit and save changes.  The "Q"
  48.       option should be used with extreme care because if visudo believes
  49.       there to be a parse error, so will sudo and no one will be able to
  50.       execute sudo again until the error is fixed.  Any other command at
  51.       this prompt will print a short help message.  When editing the sudoers
  52.       file after a parse error has been detected the cursor will be placed
  53.       on the line where the error occurred (if the editor supports this
  54.       feature).
  55.  
  56.  OPTIONS
  57.       visudo accepts the following command line option:
  58.  
  59.       -V  The -V (version) option causes visudo to print the version number
  60.           and exit.
  61.  
  62.  ERRORS
  63.       sudoers file busy, try again later.
  64.           Either someone is currently editing the sudoers file or there is a
  65.           stale sudoers lock file (/etc/stmp by default) that you need to
  66.           delete.
  67.  
  68.       /etc/stmp: Permission denied
  69.           You didn't run visudo as root.
  70.  
  71.       Can't find you in the passwd database
  72.           Your userid does not appear in the passwd file.
  73.  
  74.  FILES
  75.  
  76.                                     - 1 -        Formatted:  August 20, 1999
  77.  
  78.  visudo(8)                        17/Oct/98                        visudo(8)
  79.  MAINTENANCE COMMANDS                                   MAINTENANCE COMMANDS
  80.  
  81.                                     1.5.7
  82.  
  83.        /etc/sudoers           file of authorized users.
  84.        /etc/stmp              lock file for visudo.
  85.  
  86.  ENVIRONMENT VARIABLES
  87.       The following are used only if visudo was compiled with the ENV_EDITOR
  88.       option:
  89.  
  90.        EDITOR                 Used by visudo as the editor to use.
  91.        VISUAL                 Used by visudo if EDITOR is not set.
  92.  
  93.  AUTHOR
  94.       Many people have worked on sudo over the years, this version of visudo
  95.       was written by:
  96.  
  97.        Todd Miller            <Todd.Miller@courtesan.com>
  98.  
  99.       See the HISTORY file in the sudo distribution for more details.
  100.  
  101.       Please send all bugs, comments, and changes to sudo-
  102.       bugs@courtesan.com.
  103.  
  104.  DISCLAIMER
  105.       This program is distributed in the hope that it will be useful, but
  106.       WITHOUT ANY WARRANTY; without even the implied warranty of
  107.       MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  108.       General Public License for more details.
  109.  
  110.       You should have received a copy of the GNU General Public License
  111.       along with this program; if not, write to the Free Software
  112.       Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  113.  
  114.  CAVEATS
  115.       Due to the syntax of the sudoers file, there is no way for visudo to
  116.       tell the difference between a mistyped {Host,User,Cmnd}_Alias and a
  117.       user or host name.
  118.  
  119.       There is no easy way to prevent a user from gaining a root shell if
  120.       the editor used by visudo allows shell escapes.
  121.  
  122.  BUGS
  123.       The -V flag gives the version of the sudo package rather than the
  124.       individual visudo program.
  125.  
  126.  SEE ALSO
  127.       sudo(8), vipw(8).
  128.  
  129.                                     - 2 -        Formatted:  August 20
  130.  
  131.  visudo(8)                                                    visudo(8)
  132.  MAINTENANCE COMMANDS                                   MAINTENANCE COMMANDS
  133.  
  134.                                     1.5.7
  135.  
  136.                                     - 3 -        Formatted:  August 20
  137.  
  138.                                           visudo(8)
  139. $                                            visudo(8)

Raw Paste


Login or Register to edit or fork this paste. It's free.