本文发表在 rolia.net 枫下论坛Passwords aren't encrypted, but hashed. The distinction is that there
isn't any way to decrypt the data in the shadow file to obtain the
actual password. The password which is entered by the user is
concatenated with the salt and the result is then hashed. The hash is
compared against the one from the shadow (or passwd) file.
In the above, "$1$" indicates that the entry is hashed using MD5 (as
opposed to the traditional DES hash), "shGNybY9" is the salt, and
"L)J1gwitzN6LoeS0pMpNc/" is the base64-encoded hash (an MD5 hash is a128-bit value).
2. In the /etc/shadow file how is the password "!za1aId0hfZ2IA" encrypted and what significance does this password hold?
That is a DES hashed password, where "za" is the salt and
"1aId0hfZ2IA" is the base64-encoded DES hash (DES hashes are 64 bits, although only 56 bits are significant). The leading "!" indicates that
the account is locked (it also ensures that any attempt to validate a
password will fail, regardless of the actual password which is
entered).更多精彩文章及讨论,请光临枫下论坛 rolia.net
isn't any way to decrypt the data in the shadow file to obtain the
actual password. The password which is entered by the user is
concatenated with the salt and the result is then hashed. The hash is
compared against the one from the shadow (or passwd) file.
In the above, "$1$" indicates that the entry is hashed using MD5 (as
opposed to the traditional DES hash), "shGNybY9" is the salt, and
"L)J1gwitzN6LoeS0pMpNc/" is the base64-encoded hash (an MD5 hash is a128-bit value).
2. In the /etc/shadow file how is the password "!za1aId0hfZ2IA" encrypted and what significance does this password hold?
That is a DES hashed password, where "za" is the salt and
"1aId0hfZ2IA" is the base64-encoded DES hash (DES hashes are 64 bits, although only 56 bits are significant). The leading "!" indicates that
the account is locked (it also ensures that any attempt to validate a
password will fail, regardless of the actual password which is
entered).更多精彩文章及讨论,请光临枫下论坛 rolia.net