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