pwck(8) on Solnix vs Linux and the BSDs
On Solnix, pwck is the illumos /usr/sbin/pwck, which only reports inconsistencies in the password file on stderr and takes no options. Linux pwck also checks /etc/shadow, prompts to delete bad entries, and has options such as -r, -q, -s and -R.
The manual pages
- Solnix: pwck(8) from
pkgs.solnix.illumos-world-man· illumos.org - Linux: pwck(8) shadow-4.19.4
What Solnix runs
A default Solnix system runs the illumos pwck at /usr/sbin/pwck. No other variants are shipped. The same page also covers grpck (/usr/sbin/grpck), which checks the group file. The Linux counterpart documents grpck(8) as a separate page.
Differences
| Compared with | Topic | What differs |
|---|---|---|
| Linux | options | Solnix pwck has the synopsis /usr/sbin/pwck [filename] and documents no options. Linux pwck accepts --badname, -h, -q, -r, -R and -s. A Linux script passing any of these gets no documented support on Solnix.Source: Solnix pwck(8) SYNOPSIS; Linux pwck(8) SYNOPSIS, OPTIONS |
| Linux | shadow file checks | Linux pwck also checks /etc/shadow when it exists or when SHADOWFILE is given. This includes matching passwd and shadow entries, and checks that last password changes are not in the future. The Solnix page describes checks on the password file only.Source: Linux pwck(8) DESCRIPTION; Solnix pwck(8) DESCRIPTION |
| Linux | arguments | Solnix pwck takes one optional filename. Linux takes an optional PASSWORDFILE and an optional SHADOWFILE. Source: Solnix pwck(8) SYNOPSIS; Linux pwck(8) SYNOPSIS, OPTIONS |
| Linux | interactive deletion | Linux pwck prompts the user to delete malformed or duplicate entries. The Solnix page says it notes inconsistencies and puts messages on stderr. It does not document any prompting or deletion. Source: Linux pwck(8) DESCRIPTION; Solnix pwck(8) DESCRIPTION (last paragraph) |
| Linux | read-only mode | Linux has -r/--read-only to run read-only. The Solnix page documents no such option and describes only scanning and reporting.Source: Linux pwck(8) -r, --read-only; Solnix pwck(8) DESCRIPTION |
| Linux | checks performed | Solnix pwck validates field count, login name, user ID, group ID, and that the login directory and shell exist. Linux lists unique user name, valid primary group, valid home directory and valid login shell. Only Linux documents a uniqueness check. Source: Solnix pwck(8) DESCRIPTION; Linux pwck(8) DESCRIPTION |
| Linux | message output stream | Solnix sends all messages about inconsistent entries to stderr. The Linux page does not say which stream it uses. Check the exit status and stderr rather than stdout on Solnix. Source: Solnix pwck(8) DESCRIPTION (last sentence); Linux pwck(8) DESCRIPTION |
| Linux | alternate root | Linux pwck -R/--root CHROOT_DIR checks files under a chroot directory. Solnix documents no equivalent. The only way to check another file is the filename argument.Source: Linux pwck(8) -R, --root; Solnix pwck(8) SYNOPSIS |
| FreeBSD, OpenBSD, NetBSD | no BSD counterpart in bundle | The bundle contains no FreeBSD, OpenBSD or NetBSD pwck page, so this note makes no claim about the BSDs. Source: Bundle header (only a linux counterpart is listed) |
Standards
- POSIX: pwck is not a POSIX.1-2024 utility.
Writing portable scripts
- Call pwck with no options and at most one filename if the script must run on both Solnix and Linux. Do not pass
-r,-q,-sor-R, which only Linux documents. - Do not rely on the Solnix and Linux pwck to check the same things. Linux also checks shadow, Solnix documents only the password file.
Every difference here is taken from the manual pages linked above: Solnix's published page, Linux (man-pages and the GNU and util-linux manuals), FreeBSD, OpenBSD and NetBSD. Each row names its source. Where a manual is silent, this page is too. Compiled 2026-10-26. Found a mistake? Mail hackers@lists.solnix.io.