1 2 3 4PWD_MKDB(8) 1991 PWD_MKDB(8) 5 6 7NNAAMMEE 8 pwd_mkdb - generate the password databases 9 10SSYYNNOOPPSSIISS 11 ppwwdd__mmkkddbb [[ --pp ]] ffiillee 12 13DDEESSCCRRIIPPTTIIOONN 14 _P_w_d__m_k_d_b creates _d_b(3) style secure and insecure databases 15 for the specified file. These databases are then 16 installed into ``/etc/spwd.db'' and ``/etc/pwd.db'' 17 respectively. The file is installed into 18 ``/etc/master.passwd''. The file must be in the correct 19 format (see _p_a_s_s_w_d(5)). It is important to note that the 20 format used in this system is different from the historic 21 Version 7 style format. 22 23 The options are as follows: 24 25 -p Create a Version 7 style password file and install 26 it into ``/etc/password''. 27 28 The two databases differ in that the secure version 29 contains the user's encrypted password and the insecure 30 version has an asterisk (``*'') 31 32 The databases are used by the C library password routines 33 (see _g_e_t_p_w_e_n_t(3)). 34 35 _P_w_d__m_k_d_b exits zero on success, non-zero on failure. 36 37FFIILLEESS 38 /var/db/pwd.db The insecure password database 39 file 40 /var/db/pwd.db.tmp A temporary file 41 /var/db/spwd.db The secure password database file 42 /var/db/spwd.db.tmp A temporary file 43 /etc/master.passwd The current password file 44 /etc/passwd A Version 7 format password file 45 46BBUUGGSS 47 Because of the necessity for atomic update of the password 48 files, _p_w_d__m_k_d_b uses _r_e_n_a_m_e(2) to install them. This, 49 however, requires that the file specified on the command 50 line live on the same file system as the ``/etc'' 51 directory. 52 53 There are the obvious races with multiple people running 54 _p_w_d__m_k_d_b on different password files at the same time. 55 The front-ends to _p_w_d__m_k_d_b, _c_h_p_a_s_s(1), _p_a_s_s_w_d(1) and 56 _v_i_p_w(8), handle the locking necessary to avoid this 57 problem. 58 59CCOOMMPPAATTIIBBIILLIITTYY 60 Previous versions of the system had a program similar to 61 62 63 6429, June 1 65 66 67 68 69 70PWD_MKDB(8) 1991 PWD_MKDB(8) 71 72 73 _p_w_d__m_k_d_b, _m_k_p_a_s_s_w_d(8), which built _d_b_m (_3) style databases 74 for the password file but depended on the calling programs 75 to install them. The program was renamed in order that 76 previous users of the program not be surprised by the 77 changes in functionality. 78 79SSEEEE AALLSSOO 80 chpass(1), passwd(1), db(3), getpwent(3), passwd(5), 81 vipw(8) 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 13029, June 2 131 132 133