Used to verify the integrity of the content and format of system certification files
pwck command is used to verify the integrity of the content and format of the system authentication files /etc/passwd and /etc/shadow.
pwck(option)(parameter)
-q: only report error information;
-s: Sort files "/etc/passwd" and "/etc/shadow" by user ID;
-r: Run the command in read-only mode;
-R: Check the password file in the specified chroot environment.
pwck
user 'ftp': directory '/var/ftp' does not exist
pwck: no changes
After executing the pwck command, some warnings are displayed, indicating that the home directory /var/spool/lpd of the user lp does not exist. To solve this problem, you have several options:
If you are sure that these users will not be used, you may consider using the userdel command to delete these users.
If these users need to be used, you should create the corresponding directories. For example, you can use the following command:
# Create a directory
sudo mkdir /var/ftp
# Assign directory ownership to the corresponding user
sudo chown ftp:ftp /var/ftp
If the software packages corresponding to these users have not been installed, you may consider installing them. Package managers (such as yum or apt) usually create the necessary users and directories automatically.
优先推荐相关内容,同时保留你的阅读轨迹和收藏入口。