Patch from Martin Schwenke Index: pam.deb/modules/pam_unix/passverify.c =================================================================== --- pam.deb.orig/modules/pam_unix/passverify.c +++ pam.deb/modules/pam_unix/passverify.c @@ -719,7 +719,7 @@ struct passwd *tmpent = NULL; struct stat st; FILE *pwfile, *opwfile; - int err = 1; + int err = 1, found = 0; int oldmask; #ifdef WITH_SELINUX security_context_t prev_context=NULL; @@ -790,6 +790,7 @@ tmpent->pw_passwd = assigned_passwd.charp; err = 0; + found = 1; } if (putpwent(tmpent, pwfile)) { D(("error writing entry to password file: %m")); @@ -832,7 +833,7 @@ return PAM_SUCCESS; } else { unlink(PW_TMPFILE); - return PAM_AUTHTOK_ERR; + return found ? PAM_AUTHTOK_ERR : PAM_USER_UNKNOWN; } }