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 .\" 4. Neither the name of the University nor the names of its contributors
13 .\" may be used to endorse or promote products derived from this software
14 .\" without specific prior written permission.
16 .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
17 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
18 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
19 .\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
20 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
21 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
22 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
23 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
24 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
25 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
28 .\" @(#)pwd_mkdb.8 8.1 (Berkeley) 6/6/93
36 .Nd "generate the password databases"
49 style secure and insecure databases for the specified file.
50 These databases are then installed into
55 The file is installed into
56 .Pa /etc/master.passwd .
57 The file must be in the correct format (see
59 It is important to note that the format used in this system is
60 different from the historic Version 7 style format.
62 The options are as follows:
65 Store data in big-endian format.
67 Check if the password file is in the correct format.
69 change, add, or remove any files.
71 Store data in little-endian format.
75 to exit with an error if it cannot obtain a lock on the file.
77 we block waiting for a lock on the source file.
78 The lock is held through
79 the rebuilding of the database.
81 Create a Version 7 style password file and install it into
84 Ignore locking failure of the
87 This option is intended to be used to build password files in
88 the release process over NFS where no contention can happen.
89 A non-default directory must also be specified with the
91 option for locking to be ignored.
92 Other use of this option is strongly discouraged.
94 Store databases into specified destination directory instead of
97 Only update the record for the specified user.
99 operate on a single user can use this option to avoid the
100 overhead of rebuilding the entire database.
101 .It Fl s Ar cachesize
102 Specify in megabytes the size of the memory cache used by the
104 On systems with a large user base, a small cache
105 size can lead to prohibitively long database file rebuild times.
106 As a rough guide, the memory usage of
108 in megabytes will be a little bit more than twice the figure
110 The default is 2 megabytes.
113 The two databases differ in that the secure version contains the user's
114 encrypted password and the insecure version has an asterisk (``*'')
116 The databases are used by the C library password routines (see
121 utility exits zero on success, non-zero on failure.
125 environment variable is set,
127 will suppress the warning messages that are
128 normally generated for large user and group IDs.
129 Such IDs can cause serious problems with software
130 that makes assumptions about the values of IDs.
132 .Bl -tag -width Pa -compact
134 The insecure password database file.
135 .It Pa /etc/pwd.db.tmp
138 The secure password database file.
139 .It Pa /etc/spwd.db.tmp
141 .It Pa /etc/master.passwd
142 The current password file.
144 A Version 7 format password file.
147 Previous versions of the system had a program similar to
152 style databases for the password file but depended on the calling programs
154 The program was renamed in order that previous users of the program
155 not be surprised by the changes in functionality.
164 Because of the necessity for atomic update of the password files,
169 This, however, requires that the file specified on the command line live
170 on the same file system as the
174 There are the obvious races with multiple people running
176 on different password files at the same time.
183 handle the locking necessary to avoid this problem.