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),
Let's see if I can get all the up-votes in the world, since I wrote what became the Linux Shadow Password Suite in '87 ;)
As another poster mentioned,
In the 1980s it became obvious that dictionary attacks against the password hash stored in the
What AT&T did, and what I implemented for SCO Xenix (the original SCO Xenix, not the later evil SCO Xenix) in '87 that eventually came into use on Linux, was simply move the hashed password to
By the time Linux was created and came into wide-spread use, there were a very large number of tools for attacking password hashes. High-performance re-implementations of
Eventually the use of
In theory, a strong enough hash could be stored in
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
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.