1PWCONV(8)                 System Management Commands                 PWCONV(8)
2
3
4

NAME

6       pwconv, pwunconv, grpconv, grpunconv - convert to and from shadow
7       passwords and groups
8

SYNOPSIS

10       pwconv [options]
11
12       pwunconv [options]
13
14       grpconv [options]
15
16       grpunconv [options]
17

DESCRIPTION

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

OPTIONS

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. Only absolute paths are
63           supported.
64

BUGS

66       Errors in the password or group files (such as invalid or duplicate
67       entries) may cause these programs to loop forever or fail in other
68       strange ways. Please run pwck and grpck to correct any such errors
69       before converting to or from shadow passwords or groups.
70

CONFIGURATION

72       The following configuration variable in /etc/login.defs changes the
73       behavior of grpconv and grpunconv:
74
75       MAX_MEMBERS_PER_GROUP (number)
76           Maximum members per group entry. When the maximum is reached, a new
77           group entry (line) is started in /etc/group (with the same name,
78           same password, and same GID).
79
80           The default value is 0, meaning that there are no limits in the
81           number of members in a group.
82
83           This feature (split group) permits to limit the length of lines in
84           the group file. This is useful to make sure that lines for NIS
85           groups are not larger than 1024 characters.
86
87           If you need to enforce such limit, you can use 25.
88
89           Note: split groups may not be supported by all tools (even in the
90           Shadow toolsuite). You should not use this variable unless you
91           really need it.
92
93       The following configuration variables in /etc/login.defs change the
94       behavior of pwconv:
95
96       PASS_MAX_DAYS (number)
97           The maximum number of days a password may be used. If the password
98           is older than this, a password change will be forced. If not
99           specified, -1 will be assumed (which disables the restriction).
100
101       PASS_MIN_DAYS (number)
102           The minimum number of days allowed between password changes. Any
103           password changes attempted sooner than this will be rejected. If
104           not specified, 0 will be assumed (which disables the restriction).
105
106       PASS_WARN_AGE (number)
107           The number of days warning given before a password expires. A zero
108           means warning is given only upon the day of expiration, a negative
109           value means no warning is given. If not specified, no warning will
110           be provided.
111

FILES

113       /etc/login.defs
114           Shadow password suite configuration.
115

SEE ALSO

117       grpck(8), login.defs(5), pwck(8).
118
119
120
121shadow-utils 4.14.0               10/03/2023                         PWCONV(8)
Impressum