Verify the integrity of system authentication file content and format.
The pwck command is used to verify the integrity of the content and format of the system authentication files /etc/passwd and /etc/shadow.
pwck(options)(parameters)
-q: Report errors only;
-s: Sort `/etc/passwd` and `/etc/shadow` by user ID;
-r: Run the command in read-only mode;
-R: Check the password files in the specified chroot environment.
pwck
user 'ftp': directory '/var/ftp' does not exist
pwck: no changes
After executing the pwck command, warnings may be displayed, such as the home directory /var/ftp for user ftp not existing. To resolve this, you have several options:
userdel command to delete them.# Create the directory
sudo mkdir /var/ftp
# Assign ownership of the directory to the corresponding user
sudo chown ftp:ftp /var/ftp
yum or apt) typically create the necessary users and directories automatically.