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.

Get Linux in a Nutshell, 6th Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.