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:

  • pwconv
  • pwunconv
  • grpconv
  • grpunconv

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 โ€” creates shadow from passwd and an optionally existing shadow.
  • pwunconv โ€” creates a plain passwd from shadowed passwd and shadow, and then removes shadow.
  • grpconv โ€” creates gshadow from group and an optionally existing gshadow.
  • grpunconv โ€” creates plain group from shadowed group and gshadow, and then removes gshadow.

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:

  1. First, entries in the shadowed file which don't exist in the plain file are removed.
  2. Then, entries in the shadowed file which don't have x as the password in plain file are updated.
  3. Any missing shadowed entries are added.
  4. 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:

  1. Passwords in the plain file are updated from the shadowed file.
  2. Entries which exist in the plain file but not in the shadowed file are left alone.
  3. 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