pwck
A command that checks /etc/passwd and /etc/shadow for broken entries, with grpck doing the same for the group files.
In more detail
It reports duplicate names, missing home directories and lines with the wrong number of fields. Run with -r it only reads and changes nothing.
Taught in
- Host Security: Old Doors And New Ones — LPIC-1 Linux Administrator (101-500 and 102-500) Exam Prep