Vipw

vipw is a dedicated editor derived from vi especially designed for editing the password file, /etc/passwd, on Unix and Unix-like systems.

A dedicated editor is used, as it performs a number of checks on the file, to make sure that the password file cannot be accidentally corrupted. If the new password file is incorrect, the edits are rejected and the session is restarted. Appropriate file locks are also placed. If another user in wheel (only for non-Linux systems) is editing the password file, the user will be told to try again later.

Provided by
Most (all?) Linux distributions incorporate this from the [util-linux] project.