Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 57532 - pam_cracklib not seeing old password when chained with pam_ldap
pam_cracklib not seeing old password when chained with pam_ldap
Product: Red Hat Linux
Classification: Retired
Component: nss_ldap (Show other bugs)
i686 Linux
medium Severity medium
: ---
: ---
Assigned To: Nalin Dahyabhai
Aaron Brown
Depends On:
  Show dependency treegraph
Reported: 2001-12-14 17:44 EST by John Dalbec
Modified: 2007-04-18 12:38 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2001-12-19 14:09:37 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
patch to set PAM_OLDAUTHTOK item during prelim check (737 bytes, patch)
2001-12-18 16:57 EST, John Dalbec
no flags Details | Diff

  None (edit)
Description John Dalbec 2001-12-14 17:44:02 EST
From Bugzilla Helper:
User-Agent: Mozilla/4.77 [en] (X11; U; Linux 2.4.9-12 i686)

Description of problem:
This is a bad interaction between several components.  The "passwd" program
calls pam_chauthtok().  On PAM_PRELIM_CHECK, pam_cracklib's
pam_sm_chauthtok() does (essentially) nothing.  Then pam_ldap's
pam_sm_chauthtok() gets the old password and stores it in
PADL_LDAP_AUTHTOK_DATA with pam_set_data() (but not in PAM_OLDAUTHTOK with
pam_set_item()).  Now pam_cracklib gets control again for the update, but
it's looking for the old password in PAM_OLDAUTHTOK with pam_get_item() and
can't find it.  This disables certain checks such as simple().

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1. Define an LDAP account.
2. As the LDAP user, change its password.
3. Enter 'qwerty' at the 'New UNIX password:' prompt.

Actual Results:  Retype new UNIX password:

Expected Results:  BAD PASSWORD: is too simple

Additional info:

pam_modules.h:#define PAM_OLDAUTHTOK  7	/* The old authentication token */

This could be fixed by setting the PAM_OLDAUTHTOK item in pam_ldap or by
changing pam_cracklib to retrieve a current password and save it in
PAM_OLDAUTHTOK when not running as root.
Comment 1 John Dalbec 2001-12-18 16:57:35 EST
Created attachment 40968 [details]
patch to set PAM_OLDAUTHTOK item during prelim check
Comment 2 John Dalbec 2001-12-19 14:09:32 EST
The patch I attached includes my fix for bug #56201.

Note You need to log in before you can comment on or make changes to this bug.