Name

pwck

Synopsis

pwck [option] [files]

Description

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

-n

Noninteractive mode. Don’t prompt for input, and delete no entries. Return appropriate exit status.

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, Third 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.