1PWCONV(8) System Management Commands PWCONV(8)
2
3
4
6 pwconv, pwunconv, grpconv, grpunconv - convert to and from shadow
7 passwords and groups
8
10 pwconv
11
12 pwunconv
13
14 grpconv
15
16 grpunconv
17
19 The pwconv command creates shadow from passwd and an optionally
20 existing shadow.
21
22 The pwunconv command creates passwd from passwd and shadow and then
23 removes shadow.
24
25 The grpconv command creates gshadow from group and an optionally
26 existing gshadow.
27
28 The grpunconv command creates group from group and gshadow and then
29 removes gshadow.
30
31 These four programs all operate on the normal and shadow password and
32 group files: /etc/passwd, /etc/group, /etc/shadow, and /etc/gshadow.
33
34 Each program acquires the necessary locks before conversion. pwconv
35 and grpconv are similar. First, entries in the shadowed file which
36 don´t exist in the main file are removed. Then, shadowed entries which
37 don´t have `x´ as the password in the main file are updated. Any
38 missing shadowed entries are added. Finally, passwords in the main file
39 are replaced with `x´. These programs can be used for initial
40 conversion as well to update the shadowed file if the main file is
41 edited by hand.
42
43 pwconv will use the values of PASS_MIN_DAYS, PASS_MAX_DAYS, and
44 PASS_WARN_AGE from /etc/login.defs when adding new entries to
45 /etc/shadow.
46
47 Likewise pwunconv and grpunconv are similar. Passwords in the main file
48 are updated from the shadowed file. Entries which exist in the main
49 file but not in the shadowed file are left alone. Finally, the shadowed
50 file is removed. Some password aging information is lost by pwunconv.
51 It will convert what it can.
52
54 Errors in the password or group files (such as invalid or duplicate
55 entries) may cause these programs to loop forever or fail in other
56 strange ways. Please run pwck and grpck to correct any such errors
57 before converting to or from shadow passwords or groups.
58
60 The following configuration variable in /etc/login.defs changes the
61 behavior of grpconv and grpunconv:
62
63 MAX_MEMBERS_PER_GROUP (number)
64 Maximum members per group entry. When the maximum is reached, a new
65 group entry (line) is started in /etc/group (with the same name,
66 same password, and same GID).
67
68 The default value is 0, meaning that there are no limits in the
69 number of members in a group.
70
71 This feature (split group) permits to limit the length of lines in
72 the group file. This is useful to make sure that lines for NIS
73 groups are not larger than 1024 characters.
74
75 If you need to enforce such limit, you can use 25.
76
77 Note: split groups may not be supported by all tools (even in the
78 Shadow toolsuite). You should not use this variable unless you
79 really need it.
80
81 The following configuration variables in /etc/login.defs change the
82 behavior of pwconv:
83
84 PASS_MAX_DAYS (number)
85 The maximum number of days a password may be used. If the password
86 is older than this, a password change will be forced. If not
87 specified, -1 will be assumed (which disables the restriction).
88
89 PASS_MIN_DAYS (number)
90 The minimum number of days allowed between password changes. Any
91 password changes attempted sooner than this will be rejected. If
92 not specified, -1 will be assumed (which disables the restriction).
93
94 PASS_WARN_AGE (number)
95 The number of days warning given before a password expires. A zero
96 means warning is given only upon the day of expiration, a negative
97 value means no warning is given. If not specified, no warning will
98 be provided.
99
101 /etc/login.defs
102 Shadow password suite configuration.
103
105 grpck(8), login.defs(5), pwck(8).
106
107
108
109System Management Commands 07/24/2009 PWCONV(8)