PWCONV(8)
๐ธ NAME ๐ธ
okay so bestie, welcome to pwconv(8) โ this is the section 8 page (System Management Commands energy, admin-only vibes ๐ ) for the four little programs that flip your system between shadowed and plain account files:
pwconvpwunconvgrpconvgrpunconv
Like, converting between the system's shadowed and plain account files. That's the whole job. That's the assignment. โจ
๐ SYNOPSIS ๐
pwconv [options]
pwunconv [options]
grpconv [options]
grpunconv [options]
Four commands, same shape, all of them take [options]. Iconic. Consistent. We love to see it. ๐
๐ฆ DESCRIPTION ๐ฆ
Let's break the squad down one by one, because they are not the same, and assuming they are is how you end up sad.
pwconvโ createsshadowfrompasswdand an optionally existingshadow.pwunconvโ creates a plainpasswdfrom shadowedpasswdandshadow, and then removesshadow.grpconvโ createsgshadowfromgroupand an optionally existinggshadow.grpunconvโ creates plaingroupfrom shadowedgroupandgshadow, and then removesgshadow.
All four of these operate on the normal and shadow password and group files: /etc/passwd, /etc/group, /etc/shadow, and /etc/gshadow. Those four files, that's the whole playground. ๐
Every single one of these programs acquires the necessary locks before conversion โ so no, they will not let you two-time them. ๐
โจ the pwconv / grpconv girlies โจ
pwconv and grpconv are similar, they're basically twins. Here's the exact order of operations:
- First, entries in the shadowed file which don't exist in the plain file are removed.
- Then, entries in the shadowed file which don't have
xas the password in plain file are updated. - Any missing shadowed entries are added.
- Finally, passwords in the plain file are replaced with
x.
These programs can be used for initial conversion as well as to update the shadowed file if the plain file has been edited by hand. So like, first-time glow-up and touch-up appointment. ๐ซถ
Also, <hotpink>pwconv</hotpink> will use the values of PASS_MAX_DAYS, and PASS_WARN_AGE from /etc/login.defs when adding new entries to /etc/shadow. Noted. Important. Write it down. ๐
๐ the pwunconv / grpunconv girlies ๐
Likewise, pwunconv and grpunconv are similar:
- Passwords in the plain file are updated from the shadowed file.
- Entries which exist in the plain file but not in the shadowed file are left alone.
- Finally, the shadowed file is removed.
Heads up bestie: some password aging information is lost by pwunconv. It will convert what it can. It's doing its best, okay?? ๐ญ
โจ OPTIONS โจ
The options which apply to the pwconv, pwunconv, grpconv, and grpunconv commands are:
-h,--helpโ Display help message and exit. (The "what do I do now" button. ๐)-R,--root_CHROOT_DIR_ โ Apply changes in the _CHROOT_DIR_ directory and use the configuration files from the _CHROOT_DIR_ directory. Only absolute paths are supported. No SELINUX support.
fr fr, note that "Only absolute paths are supported" and "No SELINUX support" โ that's a real limitation, not a vibe. Don't come for me, come for the chroot. ๐
๐ BUGS ๐
Errors in the password or group files (such as invalid or duplicate entries) may cause these programs to loop forever or fail in other strange ways.
Like... it will just spin. Forever. A little infinite-for-loop of despair. ๐
Please run pwck and grpck to correct any such errors before converting to or from shadowed files. That's not a suggestion, that's a self-care routine. ๐ง
๐ CONFIGURATION ๐
The following configuration variable in /etc/login.defs changes the behavior of grpconv and grpunconv:
MAX_MEMBERS_PER_GROUP (number)
Maximum members per group entry. When the maximum is reached, a new group entry (line) is started in /etc/group (with the same name, same password, and same GID).
The default value is 0, meaning that there are no limits in the number of members in a group.
This feature (split group) permits to limit the length of lines in the group file. This is useful to make sure that lines for NIS groups are not larger than 1024 characters.
If you need to enforce such limit, you can use 25.
Note: split groups may not be supported by all tools (even in the Shadow toolsuite). You should not use this variable unless you really need it. Like, genuinely really need it. ๐จ
The following configuration variables in /etc/login.defs change the behavior of pwconv:
PASS_MAX_DAYS (number)
The maximum number of days a password may be used. If the password is older than this, a password change will be forced. If not specified, -1 will be assumed (which disables the restriction).
PASS_WARN_AGE (number)
The number of days warning given before a password expires. A zero means warning is given only upon the day of expiration, a value of -1 means no warning is given. If not specified, no warning will be provided.
๐ FILES ๐
/etc/login.defsโ Shadow password suite configuration.
๐ SEE ALSO ๐
and that's the page bestie!! ๐ you just read pwconv(8), and this whole thing comes to you from shadow-utils 4.20.0, dated 07/30/2026. go forth and convert responsibly, mwah ๐โจ๐ฆ
๐ฆ where this page comes from
- arch rolling: shadow 4.20.0.arch1-1 ยท 0BSD AND BSD-3-Clause
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms