Name
pwck
Synopsis
pwck [options] [files]
System administration command. Remove corrupt or duplicate entries in the /etc/passwd and /etc/shadow files. pwck will prompt for a “yes” or “no” before deleting entries. If the user replies “no,” the program will exit. Alternate passwd and shadow files can be checked. If correctable errors are found, the user will be encouraged to run the usermod command.
Option
- -q
Run in quiet mode. Only report serious problems.
- -r
Run in noninteractive read-only mode, answering all questions no.
- -s
Don’t check integrity, just sort entries by UID.
Exit status
- 0
Success.
- 1
Syntax error.
- 2
One or more bad password entries found.
- 3
Could not open password files.
- 4
Could not lock password files.
- 5
Could not write password files.
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access