Date: Sun, 26 Jun 2005 04:20:19 GMT From: "Stephen P. Cravey" <cravey@gotbrains.org> To: freebsd-bugs@FreeBSD.org Subject: Re: bin/74929: DES/BLF login.conf classes not working with passwd Message-ID: <200506260420.j5Q4KJIB048535@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
The following reply was made to PR bin/74929; it has been noted by GNATS. From: "Stephen P. Cravey" <cravey@gotbrains.org> To: "Mahlon E. Smith" <mahlon@martini.nu> Cc: bug-followup@FreeBSD.org Subject: Re: bin/74929: DES/BLF login.conf classes not working with passwd Date: Sat, 25 Jun 2005 23:13:45 -0500 The problem seems to be that the pam_sm_chauthtok function in the pam_unix module only checks forthe password format for the default login class (or the first in the file?) Try this: cd /usr/src/lib/libpam/modules/pam_unix fetch http://www.cravey.org/patches/pam_unix.c.diff.200506252305 patch < pam_unix.c.diff.200506252305 make && make install Then try to use passwd. Please test as user and as root. Also, make sure that other classed work against the default properly. By applying the patch again, 'patch' will assume you want to reverse the damage and wil revert the source file. then you can re-make and everything should go back to normal. This should apply cleanly to (I think) 5.3 and up. -Stephen --- pam_unix.c~ Tue Feb 10 04:13:21 2004 +++ pam_unix.c Sat Jun 25 22:34:53 2005 @@ -372,7 +372,7 @@ return (PAM_BUF_ERR); pwd->pw_change = 0; - lc = login_getclass(NULL); + lc = login_getclass(pwd->pw_class); if (login_setcryptfmt(lc, password_hash, NULL) == NULL) openpam_log(PAM_LOG_ERROR, "can't set password cipher, relying on default");
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200506260420.j5Q4KJIB048535>