The
vipw
andvigr
commands edits the files/etc/passwd
and/etc/group
, respectively. With the-s
flag, they will edit the shadow versions of those files,/etc/shadow
and/etc/gshadow
, respectively. The programs will set the appropriate locks to prevent file corruption. When looking for an editor, the programs will first try the environment variable$VISUAL
, then the environment variable$EDITOR
, and finally the default editor,vi
(1).
visudo edits the sudoers file in a safe fashion, analogous to vipw(8). visudo locks the sudoers file against multiple simultaneous edits, provides basic sanity checks, and checks for parse errors. If the sudoers file is currently being edited you will receive a message to try again later.
网友评论