The vipw and vigr commands are used to safely edit the files /etc/passwd and /etc/group in Linux systems. They will put appropriate locks when editing /etc/passwd and /etc/group files to prevent other users from making any changes in them and avoid file corruption. When you run those commands with -s flag, they will edit the shadow versions of those files, i.e. /etc/shadow and /etc/gshadow, respectively.
Get the Free Newsletter!
Subscribe to Developer Insider for top news, trends, & analysis