Linux account is recorded in the /etc/passwd file, and the password is saved in /etc/shadow
1. Open the terminal and enter head -3 / etc/passwd, press Enter to view the first three passwords.
#2. Enter cat /etc/shadow and press Enter. You can see all the users and passwords here (user passwords are encrypted and saved in the shadow file)
3. Enter ls -l /etc/passwd /etc/shadow to view the password permissions.
Recommended related articles and tutorials: linux tutorial
The above is the detailed content of How to check password in linux. For more information, please follow other related articles on the PHP Chinese website!