-
Book Overview & Buying
-
Table Of Contents
-
Feedback & Rating

Essential Linux Commands
By :

The pwck
command is a Linux system administration tool that is used to verify the consistency of the passwd
, shadow
, and group
files. The purpose of the command is to ensure that the user accounts and groups listed in these files are valid and to detect any inconsistencies between them. It is useful in maintaining the integrity and security of a Linux system, as it can help to identify and correct errors that may arise due to manual edits of these files. For example, if a user account exists in the passwd
file but not in the shadow
file, pwck
will detect this and prompt the user to fix the inconsistency. Let’s take a look at some examples using this tool:
passwd
file with sudo
pwck /etc/passwd
.The following output from the pwck
command checks the consistency of the /etc/passwd
file on our Linux system:
Figure 2.22 – Checking the consistency of the /etc/passwd file
...Change the font size
Change margin width
Change background colour