Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 1332709

Summary: password history is not updated when an admin resets the password
Product: Red Hat Enterprise Linux 7 Reporter: Noriko Hosoi <nhosoi>
Component: 389-ds-baseAssignee: Noriko Hosoi <nhosoi>
Status: CLOSED ERRATA QA Contact: Viktor Ashirov <vashirov>
Severity: medium Docs Contact: Petr Bokoc <pbokoc>
Priority: medium    
Version: 7.3CC: atolani, nkinder, pbokoc, rmeggins
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: 389-ds-base-1.3.5.3-1.el7 Doc Type: Bug Fix
Doc Text:
Passwords reset by administrators are now stored in password history When a user password was reset by an administrator, the old password was previously not stored in the user's password history. This allowed the user to reuse the same password after the reset. With this update, passwords reset manually by administrators are stored in password history, and the user must use a different password.
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-11-03 20:41:44 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Noriko Hosoi 2016-05-03 21:06:47 UTC
This bug is created as a clone of upstream ticket:
https://fedorahosted.org/389/ticket/48813

When an admin resets a password the current password is not stored in the password history.  This incorrectly allows the user to reuse the previous password after the reset.

Comment 1 Arpit Tolani 2016-05-04 22:41:18 UTC
*** Bug 1332725 has been marked as a duplicate of this bug. ***

Comment 3 Punit Kundal 2016-05-17 12:53:45 UTC
RHEL Version
RHEL 7.3 x86_64 Server
 
DS Version
389-ds-base-1.3.5.3-1.el7.x86_64
389-ds-base-libs-1.3.5.3-1.el7.x86_64
 
Steps performed to verify
 
1. Created a standalone DS instance
 
2. Configured a global password policy as follows
 
[root@dell-per630-fc-04 ~]# ldapmodify -x -D 'cn=Directory Manager' -w secret123 -h localhost -p 389
dn: cn=config
changetype: modify
replace: passwordChange
passwordChange: on
-
replace: passwordHistory
passwordHistory: on
-
replace: passwordInHistory
passwordInHistory: 4
-
replace: passwordStorageScheme
passwordStorageScheme: CLEAR
modifying entry "cn=config"
 
3. Verified that the attributes are properly set
 
[root@dell-per630-fc-04 ~]# ldapsearch -xLLL -b 'cn=config' -h localhost -p 389 -D 'cn=Directory Manager' -w secret123 -s base passwordChange passwordHistory passwordInHistory passwordStorageScheme
dn: cn=config
passwordChange: on
passwordHistory: on
passwordInHistory: 4
passwordStorageScheme: CLEAR
 
 
4. Added a user entry as below
 
[root@dell-per630-fc-04 ~]# ldapadd -x -D 'cn=Directory Manager' -w secret123 -h localhost -p 389
dn: uid=tuser,ou=people,dc=example,dc=com
objectClass: top
objectClass: person
objectClass: inetorgperson
uid: tuser
cn: test user
sn: user
userpassword: secret123
adding new entry "uid=tuser,ou=people,dc=example,dc=com"
 
5. Modified user's password as Directory Manager as below
 
[root@dell-per630-fc-04 ~]# ldapmodify -x -D 'cn=Directory Manager' -w secret123 -h localhost -p 389
dn: uid=tuser,ou=people,dc=example,dc=com
changetype: modify
replace: userpassword
userpassword: secretpw1
modifying entry "uid=tuser,ou=people,dc=example,dc=com"
 
[root@dell-per630-fc-04 ~]# ldapmodify -x -D 'cn=Directory Manager' -w secret123 -h localhost -p 389
dn: uid=tuser,ou=people,dc=example,dc=com
changetype: modify
replace: userpassword
userpassword: secretpw2
modifying entry "uid=tuser,ou=people,dc=example,dc=com"
 
[root@dell-per630-fc-04 ~]# ldapmodify -x -D 'cn=Directory Manager' -w secret123 -h localhost -p 389
dn: uid=tuser,ou=people,dc=example,dc=com
changetype: modify
replace: userpassword
userpassword: secretpw3
modifying entry "uid=tuser,ou=people,dc=example,dc=com"
 
[root@dell-per630-fc-04 ~]# ldapmodify -x -D 'cn=Directory Manager' -w secret123 -h localhost -p 389
dn: uid=tuser,ou=people,dc=example,dc=com
changetype: modify
replace: userpassword
userpassword: secretpw4
modifying entry "uid=tuser,ou=people,dc=example,dc=com"
 
since the passwordInHistory attribute to a value of 4, I've changed the user's password 4 times
 
 
6. Tried binding to the server with old password to ensure that the password has been changed
 
[root@dell-per630-fc-04 ~]# ldapmodify -x -D 'uid=tuser,ou=people,dc=example,dc=com' -w secret123 -h localhost -p 389
ldap_bind: Invalid credentials (49)
 
as can be seen above, the bind fails with an invalid credentials error, this proves that the password has been changed successfully
 
7. Tried using the passwords again all 4 password again
 
[root@dell-per630-fc-04 ~]# ldapmodify -x -D 'uid=tuser,ou=people,dc=example,dc=com' -w secretpw4 -h localhost -p 389
dn: uid=tuser,ou=people,dc=example,dc=com
changetype: modify
replace: userpassword
userpassword: secretpw1
modifying entry "uid=tuser,ou=people,dc=example,dc=com"
ldap_modify: Constraint violation (19)
        additional info: password in history
 
 
[root@dell-per630-fc-04 ~]# ldapmodify -x -D 'uid=tuser,ou=people,dc=example,dc=com' -w secretpw4 -h localhost -p 389
dn: uid=tuser,ou=people,dc=example,dc=com
changetype: modify
replace: userpassword
userpassword: secretpw2
modifying entry "uid=tuser,ou=people,dc=example,dc=com"
ldap_modify: Constraint violation (19)
        additional info: password in history
 
[root@dell-per630-fc-04 ~]# ldapmodify -x -D 'uid=tuser,ou=people,dc=example,dc=com' -w secretpw4 -h localhost -p 389
dn: uid=tuser,ou=people,dc=example,dc=com
changetype: modify
replace: userpassword
userpassword: secretpw3
modifying entry "uid=tuser,ou=people,dc=example,dc=com"
ldap_modify: Constraint violation (19)
        additional info: password in history
 
[root@dell-per630-fc-04 ~]# ldapmodify -x -D 'uid=tuser,ou=people,dc=example,dc=com' -w secretpw4 -h localhost -p 389
dn: uid=tuser,ou=people,dc=example,dc=com
changetype: modify
replace: userpassword
userpassword: secretpw4
modifying entry "uid=tuser,ou=people,dc=example,dc=com"
ldap_modify: Constraint violation (19)
        additional info: password in history
 
 
as can be seen above, all 4 passwords are rejected as all of them are stored in history
 
8. Tried using a different password
 
[root@dell-per630-fc-04 ~]# ldapmodify -x -D 'uid=tuser,ou=people,dc=example,dc=com' -w secretpw4 -h localhost -p 389
dn: uid=tuser,ou=people,dc=example,dc=com
changetype: modify
replace: userpassword
userpassword: secret1234
modifying entry "uid=tuser,ou=people,dc=example,dc=com"
 
as can be seen above, this password is accepted and saved since it is different

Comment 4 Arpit Tolani 2016-06-16 16:04:25 UTC
Would it be possible to backport this fix to RHEL6?

Comment 5 Noriko Hosoi 2016-06-16 19:23:48 UTC
(In reply to Arpit Tolani from comment #4)
> Would it be possible to backport this fix to RHEL6?

I'm happy to tell you this bug fix is already in the next 6.8.z release.
https://bugzilla.redhat.com/show_bug.cgi?id=1342614

Bug report changed to ON_QA status by Errata System.
A QE request has been submitted for advisory RHBA-2016:23784-01
https://errata.devel.redhat.com/advisory/23784

Comment 7 errata-xmlrpc 2016-11-03 20:41:44 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHSA-2016-2594.html