pwck
Verify password file integrity and consistency
TLDR
Check password file integrity
SYNOPSIS
pwck [options] [passwd] [shadow]
DESCRIPTION
pwck verifies the integrity of /etc/passwd and /etc/shadow files by checking for proper formatting, valid field values, and internal consistency. It detects problems like duplicate usernames, invalid UIDs/GIDs, missing home directories, and entries that don't match between the password and shadow files.
By default pwck prompts to delete invalid entries, but the -r flag runs in read-only mode for auditing without making changes. The command is part of shadow-utils and is typically run by administrators after manual edits to password files or as part of system health checks.
PARAMETERS
PASSWD
Password file path.SHADOW
Shadow file path.-r
Read-only mode.-q
Quiet output.-s
Sort by UID.
CAVEATS
Requires root for shadow file. System administration tool.
HISTORY
pwck is a shadow-utils utility for password file verification.
