How To Check a User’s Password in Linux (And What You Can Actually See)
If you’re using Linux and wondering how to check the password of a user, the short answer is:
you cannot and should not see the actual password.
Linux is designed so that no one (not even the system administrator) can directly view user passwords in plain text. Instead, Linux stores hashed (mathematically scrambled) versions of passwords.
What you can do is:
- Check whether a password is set
- See how passwords are stored (hash type, last change date, expiry)
- Verify that a user can authenticate (by testing)
- Reset or change a password
This FAQ walks through how Linux handles passwords and what “checking a user’s password” really means in practice.
How Linux Stores User Passwords
On a typical Linux system, user account information is stored in:
- /etc/passwd – basic account details
- /etc/shadow – password hashes and password policy info
/etc/passwd: Basic account info
Run: