LinuxCommandLibrary

vipw

Safely edit password files with locking

TLDR

Edit password file

$ vipw
copy
Display version
$ vipw -V
copy

SYNOPSIS

vipw [OPTIONS]

DESCRIPTION

vipw safely edits the password file (/etc/passwd). It locks the file to prevent simultaneous edits, runs an editor, and validates the file format before saving.
Using vipw instead of directly editing the password file prevents corruption from concurrent access and syntax errors.

PARAMETERS

-V, --version

Display version information
-s, --shadow
Edit the shadow password file

CAVEATS

Requires root privileges. Uses EDITOR or VISUAL environment variable for editor selection. File is locked during editing. Use vigr for group file editing.

SEE ALSO

vigr(8), passwd(5), shadow(5)

> TERMINAL_GEAR

Curated for the Linux community

Copied to clipboard

> TERMINAL_GEAR

Curated for the Linux community