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 [options]
11
12 pwunconv [options]
13
14 grpconv [options]
15
16 grpunconv [options]
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 The options which apply to the pwconv, pwunconv, grpconv, and grpunconv
55 commands are:
56
57 -h, --help
58 Display help message and exit.
59
60 -R, --root CHROOT_DIR
61 Apply changes in the CHROOT_DIR directory and use the configuration
62 files from the CHROOT_DIR directory.
63
65 Errors in the password or group files (such as invalid or duplicate
66 entries) may cause these programs to loop forever or fail in other
67 strange ways. Please run pwck and grpck to correct any such errors
68 before converting to or from shadow passwords or groups.
69
71 The following configuration variable in /etc/login.defs changes the
72 behavior of grpconv and grpunconv:
73
74 MAX_MEMBERS_PER_GROUP (number)
75 Maximum members per group entry. When the maximum is reached, a new
76 group entry (line) is started in /etc/group (with the same name,
77 same password, and same GID).
78
79 The default value is 0, meaning that there are no limits in the
80 number of members in a group.
81
82 This feature (split group) permits to limit the length of lines in
83 the group file. This is useful to make sure that lines for NIS
84 groups are not larger than 1024 characters.
85
86 If you need to enforce such limit, you can use 25.
87
88 Note: split groups may not be supported by all tools (even in the
89 Shadow toolsuite). You should not use this variable unless you
90 really need it.
91
92 The following configuration variables in /etc/login.defs change the
93 behavior of pwconv:
94
95 PASS_MAX_DAYS (number)
96 The maximum number of days a password may be used. If the password
97 is older than this, a password change will be forced. If not
98 specified, -1 will be assumed (which disables the restriction).
99
100 PASS_MIN_DAYS (number)
101 The minimum number of days allowed between password changes. Any
102 password changes attempted sooner than this will be rejected. If
103 not specified, 0 will be assumed (which disables the restriction).
104
105 PASS_WARN_AGE (number)
106 The number of days warning given before a password expires. A zero
107 means warning is given only upon the day of expiration, a negative
108 value means no warning is given. If not specified, no warning will
109 be provided.
110
112 /etc/login.defs
113 Shadow password suite configuration.
114
116 grpck(8), login.defs(5), pwck(8).
117
118
119
120shadow-utils 4.11.1 02/10/2022 PWCONV(8)