On Mon, Feb 16, 2004 at 10:16:09PM +1300, Chris Hellyar wrote:
> I was hoping to not have to reset passwords, but I've discovered that
> the hashing is different in /etc/shadow bewteen the two
> distros/versions.
> I've got MD5 enabled on the Debian box, and whatever is default on the
> RedHat setup (MD5 I had assumed).
Confirm that the RedHat box is using MD5. Check /etc/pam.d/login for
the 'md5' option, and also check /etc/login.defs to see if
'MD5_CRYPT_ENAB' is specified.
> I've come to this conclusion two ways, I copied and pasted a hash from
> the redhat onto a debian box, and couldn't log in with the good
If both machines are using the same PAM configuration, this should work.
> password, and if I set the password to be the same thing on both
> machines using passwd, I get different hashes..
Yes, this is by design. The hash stored in /etc/shadow is generated
from your specified password plus a random value (the salt). This
results in (n) * (salt size) possible hashes for any given password.
See crypt(3) for a good description of the original algorithm.
Cheers,
-mjg
--
Matthew Gregan |/
/| [EMAIL PROTECTED]