ePortfolios |STEM Gender Equality | ZOOM | Slack | Spreading Mathematical Happiness

You can support MathsGee with your DONATION

0 like 0 dislike
80 views
Where is my password stored on Linux/Unix?
| 80 views

0 like 0 dislike

The passwords are not stored anywhere on the system at all. What is stored in /etc/shadow are so called hashes of the passwords.

A hash of some text is created by performing a so called one way function on the text (password), thus creating a string to check against. By design it is "impossible" (computationally infeasible) to reverse that process.

Older Unix variants stored the encrypted passwords in /etc/passwd along with other information about each account.

Newer ones simply have a * in the relevant field in /etc/passwd and use /etc/shadow to store the password, in part to ensure nobody gets read access to the passwords when they only need the other stuff (shadow is usually protected more strongly than passwd).

For more info consult man cryptman shadowman passwd.

by Diamond (53,824 points)

0 like 0 dislike
0 like 0 dislike
0 like 0 dislike
0 like 0 dislike