Package: libpam-modules Version: 1.1.3-7 pam_userdb should at least support the platform crypt() algorithms; ideally it should support the same set as pam_unix.
Patch for the first part is attached (works for me with cups on kfreebsd). It would also be nice to have a tool to generate the hashes (i wrote my own "mkcrypt" now...).
--- pam-1.1.3.orig/modules/pam_userdb/pam_userdb.c 2010-05-27 14:49:23.000000000 +0200 +++ pam-1.1.3/modules/pam_userdb/pam_userdb.c 2012-05-06 13:28:35.000000000 +0200 @@ -214,17 +214,11 @@ /* crypt(3) password storage */ char *cryptpw; - char salt[2]; - if (data.dsize != 13) { - compare = -2; - } else if (ctrl & PAM_ICASE_ARG) { + if (ctrl & PAM_ICASE_ARG) { compare = -2; } else { - salt[0] = *data.dptr; - salt[1] = *(data.dptr + 1); - - cryptpw = crypt (pass, salt); + cryptpw = crypt (pass, data.dptr); if (cryptpw) { compare = strncasecmp (data.dptr, cryptpw, data.dsize);