Messages in this thread | | | Date | Tue, 16 Nov 1999 12:52:14 -0600 | From | Tim Walberg <> | Subject | Re: slightly OT::shadow file.. |
| |
On 11/16/1999 11:46 -0600, Tim Walberg wrote: >> >> It's been a while since I've looked at this, but IIRC, the salt in this >> case should be "$1$hI.ost8u$", not "$1"... the "$1$" identifies to the >> crypt function to use the MD5 algorithm, rather than the DES variant, >> the >> "hI.ost8u" portion is the actual salt, followed by another "$" >> terminator. >> Using a salt string that does not start with "$1$" results in the legacy >> DES variant crypt functionality. >> >> I may not have gotten that all right, but it should give you someplace >> to start - peruse the libc source for more details... >>
additional info/example :
calvin:/tmp> cat x.c #define _XOPEN_SOURCE #include <unistd.h>
main() { printf("%s\n", crypt("fred", "$1$01234567")); printf("%s\n", crypt("fred", "01234567")); } calvin:/tmp> cc -o x x.c -lcrypt && ./x $1$01234567$3oTUhHaCBihUewpj5Rymp. 01i1MuiFifZLg calvin:/tmp>
-- +------------------------------+--------------------------+ | Tim Walberg | Phone: 847-782-2472 | | TERAbridge Technologies Corp | FAX: 847-623-1717 | | 1375 Tri-State Parkway | twalberg@terabridge.com | | Gurnee, IL 60031 | 800-SKY-TEL2 PIN 9353299 | +------------------------------+--------------------------+ [unhandled content-type:application/pgp-signature] | |