macro and text revision (-mdoc version 3)
[unix-history] / usr / src / usr.sbin / vipw / vipw.8
.\" Copyright (c) 1983, 1991 The Regents of the University of California.
.\" All rights reserved.
.\"
.\" %sccs.include.redist.man%
.\"
.\" @(#)vipw.8 6.7 (Berkeley) %G%
.\"
.Dd
.Dt VIPW 8
.Os BSD 4
.Sh NAME
.Nm vipw
.Nd edit the password file
.Sh SYNOPSIS
.Nm vipw
.Sh DESCRIPTION
.Nm Vipw
edits the password file after setting the appropriate locks,
and does any necessary processing after the password file is unlocked.
If the password file is already locked for editing by another user,
.Nm vipw
will ask you
to try again later. The default editor for
.Nm vipw
is
.Xr vi 1 .
.Pp
.Nm Vipw
performs a number of consistency checks on the password entries,
and will not allow a password file with a
.Dq mangled
entry to be
installed.
If
.Nm vipw
rejects the new password file, the user is prompted to re-enter
the edit session.
.Pp
Once the information has been verified,
.Nm vipw
uses
.Xr pwd_mkdb 8
to update the user database. This is run in the background, and,
at very large sites could take several minutes. Until this update
is completed, the password file is unavailable for other updates
and the new information is not available to programs.
.Sh ENVIRONMENT
If the following environment variable exists it will be utilized by
.Nm vipw :
.Bl -tag -width EDITOR
.It Ev EDITOR
The editor specified by the string
.Ev EDITOR
will be invoked instead of the default editor
.Xr vi 1 .
.El
.Sh SEE ALSO
.Xr chpass 1 ,
.Xr passwd 1 ,
.Xr passwd 5 ,
.Xr adduser 8 ,
.Xr pwd_mkdb 8
.Sh HISTORY
The
.Nm
command appeared in
.Bx 4.0 .