It looks like the original password that are passed to lutil_passwd() is not base64-encoded. It is ok and chk_crypt() works, but chk_md5() and chk_smd5() tries to base64-decode the original password and does not work (for me). Authetication worked when I removed the base64-decoding from chk_md5(). Tore.