# Bad Crypt!

Alex Stewart (riche@crl.com)
Sun, 8 Oct 1995 02:47:49 PDT

- Messages sorted by:[ date ][ thread ][ subject ][ author ]

    > A while back I asked the list if they knew why a fresh db couldn't set
    > passwords correctly.  I thought perhaps it was a bad crypt during
    > compile.  I'm running under FreeBSD.  Any suggestions?

    Do the following from inside the MOO environment in question:

      ;crypt("some string")

    you should get back something along the lines of (this is an example, yours
    probably won't be the same string.  Doesn't really matter what you get back):

      => "wOCq7A/q9eOLk"

    Now take the first two characters from that response, and run crypt() again
    with them as the second arg:

      ;crypt("some string", "wO")

    You should get back the same result:

      => "wOCq7A/q9eOLk"

    If you don't get back the same result as the first crypt() call, your unix
    crypt implementation is broken, and that's your problem.  I don't know much
    about FreeBSD, but if you can't figure out how to get its crypt function to
    work right, you could try getting the GNU crypt implementation (the GNU Ultra
    Fast Crypt library, available from many (particularly non-US) GNU FTP sites)
    and try having the MOO use its crypt function instead of the FreeBSD one..

    -R
    -------------------------------------------------------------------------------
         Alex Stewart - riche@crl.com - Richelieu @ Diversity University MOO
                             http://www.crl.com/~riche/
                "Difficult answers lead to intelligent questions."