1 .\" Copyright (c) 1991, 1993
2 .\" The Regents of the University of California. All rights reserved.
4 .\" Redistribution and use in source and binary forms, with or without
5 .\" modification, are permitted provided that the following conditions
7 .\" 1. Redistributions of source code must retain the above copyright
8 .\" notice, this list of conditions and the following disclaimer.
9 .\" 2. Redistributions in binary form must reproduce the above copyright
10 .\" notice, this list of conditions and the following disclaimer in the
11 .\" documentation and/or other materials provided with the distribution.
12 .\" 3. All advertising materials mentioning features or use of this software
13 .\" must display the following acknowledgement:
14 .\" This product includes software developed by the University of
15 .\" California, Berkeley and its contributors.
16 .\" 4. Neither the name of the University nor the names of its contributors
17 .\" may be used to endorse or promote products derived from this software
18 .\" without specific prior written permission.
20 .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
21 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
23 .\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
24 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
25 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
26 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
27 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
28 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
29 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
32 .\" @(#)pwd_mkdb.8 8.1 (Berkeley) 6/6/93
33 .\" $FreeBSD: src/usr.sbin/pwd_mkdb/pwd_mkdb.8,v 1.15.2.4 2003/03/11 22:31:31 trhodes Exp $
34 .\" $DragonFly: src/usr.sbin/pwd_mkdb/pwd_mkdb.8,v 1.3 2006/02/17 19:40:22 swildner Exp $
41 .Nd "generate the password databases"
56 style secure and insecure databases for the specified file.
57 These databases are then installed into
62 The file is installed into
63 .Pa /etc/master.passwd .
64 The file must be in the correct format (see
66 It is important to note that the format used in this system is
67 different from the historic Version 7 style format.
69 The options are as follows:
72 Check if the password file is in the correct format.
74 change, add, or remove any files.
78 to exit with an error if it cannot obtain a lock on the file. By default,
79 we block waiting for a lock on the source file. The lock is held through
80 the rebuilding of the database.
82 Create a Version 7 style password file and install it into
85 Store databases into specified destination directory instead of
88 Only update the record for the specified user. Utilities that
89 operate on a single user can use this option to avoid the
90 overhead of rebuilding the entire database.
92 Specify in megabytes the size of the memory cache used by the
93 hashing library. On systems with a large user base, a small cache
94 size can lead to prohibitively long database file rebuild times.
95 As a rough guide, the memory usage of
97 in megabytes will be a little bit more than twice the figure
98 specified here. The default is 2 megabytes.
101 The two databases differ in that the secure version contains the user's
102 encrypted password and the insecure version has an asterisk (``*'')
104 The databases are used by the C library password routines (see
109 utility exits zero on success, non-zero on failure.
113 environment variable is set,
115 will suppress the warning messages that are
116 normally generated for large user and group IDs.
117 Such IDs can cause serious problems with software
118 that makes assumptions about the values of IDs.
120 .Bl -tag -width Pa -compact
122 The insecure password database file.
123 .It Pa /etc/pwd.db.tmp
126 The secure password database file.
127 .It Pa /etc/spwd.db.tmp
129 .It Pa /etc/master.passwd
130 The current password file.
132 A Version 7 format password file.
135 Previous versions of the system had a program similar to
140 style databases for the password file but depended on the calling programs
142 The program was renamed in order that previous users of the program
143 not be surprised by the changes in functionality.
152 Because of the necessity for atomic update of the password files,
157 This, however, requires that the file specified on the command line live
158 on the same file system as the
162 There are the obvious races with multiple people running
164 on different password files at the same time.
171 handle the locking necessary to avoid this problem.