Hello:
Suresh Ramasubramanian wrote,
> +++ Shanker Balan [linux-india] <22/02/02 18:24 +0530>:
> > Apparently, the Linux glibc crypt() function is not exactly the same as
> > the OpenSSL crypt() function, depending on the order in which you link
> > -lcrypto and -lcrypt, you might end up with strange results.
>
> Exactly the point I was making. The bsd and linux crypt()s are different in
> nature.
The libc implementation in FreeBSD and Linux must be the same, at least
thats what the manpage suggests.
AFAIK, PHP and Perl use the libc implementations and the crypt function
provided by both PHP and Perl under both the OSes _is_ the same.
IOW, this PHP code will provide the same result under both systems:
$hash = crypt($passwd, salt("$1$12345678$"));
> > - Linux/FreeBSD style password hashes use $1$ and an 8 char salt.
> > Depending on the salt, the Perl/PHP crypt functions hashed output will
> > change.
>
> Yup - so when you use software which generates bsd style passwords, and try
> them out on linux?
Hmm, too little time for me to code take a C book and write a password
generator right no. /me has to join a Unreal Tournament DM or get left
behind in the scores! ;)
> > > on linux with (say) exim on linux ... and try to verify courier
> > > passwords by throwing them at crypt().
> > I don't think that will work. You will have to throw in the salt part to
> > the crypt function as well.
>
> that's right ... but throw them at the LINUX crypt() I mean.
Will do that tomorrow.
> > John against Debian shadow file:
> > su-2.05a# john /mnt/deb-root/etc/shadow
> > Loaded 3 passwords with 2 different salts (FreeBSD MD5 [32/32])
> > john against FreeBSD 4.5:
> > su-2.05a# john /etc/master.passwd
> > Loaded 2 passwords with 2 different salts (FreeBSD MD5 [32/32])
> > John sez that both are "FreeBSD MD5 [32/32]". Settled? :-D
>
> Hmmm...
He He, this is turning out to be an interesting thread for me at least.
:)
-- Shanu
--
Good night to spend with family, but avoid arguments with your mate's
new lover.
_______________________________________________
linux-india-help mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/linux-india-help