What is the purpose of the /etc/shadow file in Linux Operating system? Also, is it same for SUSE clients? There is one shadow cache file is maintained what is purpose of that?
migrated from stackoverflow.com Feb 6 '11 at 13:21
This question came from our site for professional and enthusiast programmers.
From the beginning, Unix and Unix-style operating systems (including Linux) have always stored passwords as cryptographic hashes (1). These hashes were originally stored in
To prevent this, the hashed passwords were eventually moved into a file readable only by root (and occasionally a privileged group of administrators),
Originally, the encrypted password was stored in
But then people realized that this was a security problem. Anybody with enough time could do what's called a bruteforce attack, by programatically generating encrypted passwords for every possible password. If the attacker did that without actually trying to log in via
So the encrypted password was moved into the newly created
It also contains other information that the
I can't say whether it is the same for SUSE, without knowing which version of SUSE you are dealing with. For example, your SUSE system may use Blowfish rather than MD5.
You also implied you were mixing your
See Problems migrating shadow file from SuSE 9.3 to Ubuntu Server x86_64 for example.
To try to figure it out, open up
If you are using Ubuntu, the first Google search result for Ubuntu blowfish might be a good starting place.
Users are listed in the
Each line corresponds to a user entry and different fields are separated by colons. The first filed is the login, it is followed by the corresponding password.
Encrypted passwords used to be stored in this field. However, the