# HG changeset patch # User Timo Sirainen # Date 1041772298 -7200 # Node ID 77a0eb2b5397b60734b95adc47924f7a3f4cf874 # Parent fd8888f6f037710d66b0d2461db38a3a40499c7f Updates to MD5 passwords. diff -r fd8888f6f037 -r 77a0eb2b5397 doc/auth.txt --- a/doc/auth.txt Sun Jan 05 15:09:51 2003 +0200 +++ b/doc/auth.txt Sun Jan 05 15:11:38 2003 +0200 @@ -76,8 +76,7 @@ Realm is useful only with Digest-MD5 authentication. It's possible to have multiple users with same name but in different realms. If plaintext is used -to log in, the user is searched from all the realms, and first found is -used. +to log in, user is expected to be in no realm. The password field is in format: "[" "]", like "foo[13]". Type can be one of the following: @@ -90,7 +89,23 @@ 34 methods are compatible with PAM module pwdfile. Only the 56 method works with Digest-MD5 authentication. -Easiest way to generate Digest-MD5 passwords is to use perl: +DES +--- + +Use either mkpasswd, or: + +perl -e 'print crypt("pass", "two-letter-salt")."\n"' + +MD5 +--- -perl -MDigest::MD5 -e 'print Digest::MD5::md5_hex("user:realm:pass")."\n"' +perl -MDigest::MD5 -e 'print Digest::MD5::md5_hex("pass")."[34]\n"' + +Digest-MD5 +---------- +perl -MDigest::MD5 -e 'print Digest::MD5::md5_hex("user:realm:pass")."[56]\n"' + +For plaintext authentication: + +perl -MDigest::MD5 -e 'print Digest::MD5::md5_hex("user::pass")."[56]\n"'