pwck command line utility and its examples

This command from Unix variants checks the consistency of passwd and shadow files from /etc, which stores the user account information. Hence we can use the pwck command to check for any inconsistencies within these files.

The passwd and shadow files are verified against a set of rules and flags any errors that it finds.

  • User with no home directory specified
  • User with no valid shell specified
  • Users with the same UID.
  • Duplicate entries under /etc/passwd
  • Non-existent home directories
  • Incorrect file ownership or permissions on passwd or shadow files.

About pwckTo verify integrity of password files
Comes From
Configuration FilesNA


1. To verify integrity of password files

# pwck

2. To report errors only

# pwck -q

3. To execute the pwck command in read only mode

# pwck -r

4. To sort entries in passwd and shadow file

# pwck -s

5. To get the help for pwck

# pwck –help

Related Commands: group, grpck, passwd, shadow, usermod

Leave a Reply

Your email address will not be published. Required fields are marked *