Linux Commands Examples

A great documentation place for Linux commands


, vigr edit the password, group, shadow-password or shadow-group file

see also : vigr - vi - passwd


vipw [options]

vigr [options]

add an example, a script, a trick and tips

: email address (won't be displayed)
: name

Step 2

Thanks for this example ! - It will be moderated and published shortly.

Feel free to post other examples
Oops ! There is a tiny cockup. A damn 404 cockup. Please contact the loosy team who maintains and develops this wonderful site by clicking in the mighty feedback button on the side of the page. Say what happened. Thanks!


/usr/bin/newgrp \
/usr/sbin/vigr \
/usr/sbin/vipw \
/usr/share/man/man1/chfn.1 \
/usr/share/man/man1/chsh.1 \
/usr/share/man/man1/login.1 \
/usr/share/man/man8/vigr.8 \
/usr/share/man/man8/vipw.8 \
/usr/share/man/man3/getspnam.3 \
/usr/share/man/man5/passwd.5 \


The vipw and vigr 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).


The options which apply to the vipw and vigr commands are:

-g, --group

Edit group database.

-h, --help

Display help message and exit.

-p, --passwd

Edit passwd database.

-q, --quiet

Quiet mode.

-R, --root CHROOT_DIR

Apply changes in the CHROOT_DIR directory and use the configuration files from the CHROOT_DIR directory.

-s, --shadow

Edit shadow or gshadow database.



Editor to be used.


Editor to be used if VISUAL is not set.



Group account information.


Secure group account information.


User account information.


Secure user account information.

see also

vi , group, gshadow , passwd , , shadow.

How can this site be more helpful to YOU ?

give  feedback