1.\" $OpenBSD: vipw.8,v 1.14 2020/11/01 21:32:04 jmc Exp $ 2.\" $NetBSD: vipw.8,v 1.4 1995/01/20 19:19:56 mycroft Exp $ 3.\" 4.\" Copyright (c) 1983, 1991, 1993 5.\" The Regents of the University of California. All rights reserved. 6.\" 7.\" Redistribution and use in source and binary forms, with or without 8.\" modification, are permitted provided that the following conditions 9.\" are met: 10.\" 1. Redistributions of source code must retain the above copyright 11.\" notice, this list of conditions and the following disclaimer. 12.\" 2. Redistributions in binary form must reproduce the above copyright 13.\" notice, this list of conditions and the following disclaimer in the 14.\" documentation and/or other materials provided with the distribution. 15.\" 3. Neither the name of the University nor the names of its contributors 16.\" may be used to endorse or promote products derived from this software 17.\" without specific prior written permission. 18.\" 19.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 20.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 21.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 22.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 23.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 24.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 25.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 26.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 27.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 28.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 29.\" SUCH DAMAGE. 30.\" 31.\" @(#)vipw.8 8.1 (Berkeley) 6/6/93 32.\" 33.Dd $Mdocdate: November 1 2020 $ 34.Dt VIPW 8 35.Os 36.Sh NAME 37.Nm vipw 38.Nd edit the password file 39.Sh SYNOPSIS 40.Nm vipw 41.Sh DESCRIPTION 42.Nm 43edits the password file after setting the appropriate locks, 44and does any necessary processing after the password file is unlocked. 45If the password file is already locked for editing by another user, 46.Nm 47will ask you 48to try again later. 49The default editor for 50.Nm 51is 52.Xr vi 1 . 53.Pp 54.Nm 55performs a number of consistency checks on the password entries, 56and will not allow a password file with a 57.Dq mangled 58entry to be 59installed. 60If 61.Nm 62rejects the new password file, the user is prompted to re-enter 63the edit session. 64.Pp 65Once the information has been verified, 66.Nm 67uses 68.Xr pwd_mkdb 8 69to update the user database. 70This is run in the background and, 71at very large sites, could take several minutes. 72Until this update 73is completed, the password file is unavailable for other updates 74and the new information is not available to programs. 75.Pp 76Which type of cipher is used to encrypt the password information 77depends on the configuration in 78.Xr login.conf 5 . 79.Sh ENVIRONMENT 80If the following environment variable exists, it will be utilized by 81.Nm vipw : 82.Bl -tag -width EDITOR 83.It Ev EDITOR 84The editor specified by the string 85.Ev EDITOR 86will be invoked instead of the default editor 87.Xr vi 1 . 88.El 89.Sh FILES 90.Bl -tag -width "/etc/master.passwdXXX" -compact 91.It Pa /etc/master.passwd 92Current password file. 93.It Pa /etc/passwd 94Legacy password file. 95.It Pa /etc/ptmp 96Password lock file. 97.It Pa /etc/pwd.db 98Insecure password database file. 99.It Pa /etc/spwd.db 100Secure password database file. 101.El 102.Sh SEE ALSO 103.Xr chpass 1 , 104.Xr passwd 1 , 105.Xr login.conf 5 , 106.Xr passwd 5 , 107.Xr adduser 8 , 108.Xr pwd_mkdb 8 109.Sh HISTORY 110The 111.Nm 112command appeared in 113.Bx 4.0 . 114