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.
Description of problem:
Customer has specified the following password policy:
nsslapd-pwpolicy-local: on
passwordLockout: on
passwordUnlock: off
passwordLockoutDuration: 3600
passwordIsGlobalPolicy: on
passwordChange: on
passwordGraceLimit: 3
passwordExp: on
passwordMustChange: on
passwordMaxAge: 7776000
passwordWarning: 604800
passwordMinAge: 86400
passwordHistory: on
passwordInHistory: 6
passwordCheckSyntax: on
passwordMinLength: 8
passwordMinAlphas: 1
passwordMinDigits: 1
passwordMinSpecials: 1
passwordMinCategories: 3
Customer noticed that if an user's password is reset by "cn=directory manager", the user gets "Password change failed. Server message: Please make sure the password meets the complexity constraints" when ssh into a sssd client, even though the same password gets accepted happily via ldapmodify!
#ldapmodify -h ibm-x3755-1.gsslab.rdu2.redhat.com -p 389 -D "uid=ASmith,ou=People,dc=example,dc=com" -w T0_change_n0w
Sat 12 Nov 06:29:34 EST 2016
dn: uid=ASmith,ou=People,dc=example,dc=com
changetype: modify
replace: userpassword
userpassword: Ge9EiG#oh5Ee <<<<<<<
From a sssd client:
ldappasswd -ZZ -h ibm-x3755-1.gsslab.rdu2.redhat.com -p 389 -D "uid=ASmith,ou=People,dc=example,dc=com" -w T0_change_n0w -s Ge9EiG#oh5Ee "uid=ASmith,ou=People,dc=example,dc=com"
Result: Constraint violation (19)
Additional info: Failed to update password
also via ssh:
[ming@snowflake ~]$ ssh asmith.pnq2.redhat.com
asmith.pnq2.redhat.com's password:
Password expired. Change your password now.
Last login: Mon Nov 14 21:17:05 2016 from vpn1-5-81.ams2.redhat.com
...
WARNING: Your password has expired.
You must change your password now and login again!
Changing password for user asmith.
Current Password:
New password: <<<<type in Ge9EiG#oh5Ee <<<<<<<
Retype new password: <<<<type in Ge9EiG#oh5Ee <<<<<<<
Password change failed. Server message: Please make sure the password meets the complexity constraints.
passwd: Authentication token is no longer valid; new one required
Corresponding DS' access log shows:
[14/Nov/2016:08:10:26.499614367 -0500] conn=314 op=2 EXT oid="1.3.6.1.4.1.4203.1.11.1" name="passwd_modify_plugin"
[14/Nov/2016:08:10:26.500434883 -0500] conn=314 op=2 RESULT err=19 tag=120 nentries=0 etime=0
The reason of the failure is due to the following:
nscpentrywsi: passwordAllowChangeTime: 20161121112040Z
nscpentrywsi: passwordGraceUserTime: 0
nscpentrywsi: passwordExpirationTime: 19700101000000Z
nscpentrywsi: passwordExpWarned: 1
Resetting the password as "cn=directory manager" change passwordExpirationTime to 19700101000000Z, i.e. no password expiration date, but the passwordAllowChangeTime is still in the past!
Version-Release number of selected component (if applicable):
sssd-1.13.0-40.el7_2.12.x86_64
RHDS10
How reproducible:
Steps to Reproduce:
1. Setup a RHDS10 server, configure the password policy as above.
2. Setup RHEL7.2 sssd client
3. Configure TLS on RHDS10 server
4. Create an user on RHDS10 and then reset the user's password as "cn=directory manager"
5. Attempt to update the user's password via ldapmodify as well as via ldappasswd on sssd client.
Actual results:
Expected results:
If password policy enforces "passwordMustChange: on" then we should not check passwordMinAge. This should be independent of whether update is done via ldapmodify or ldappasswd.
Additional info:
The RC of the ldappasswd failure is that it uses an internal operation to update the password. In op_shared_allow_pw_change there is this test:
/* check if password is within password minimum age;
error result is sent directly from check_pw_minage */
if ((internal_op || !pb->pb_conn->c_needpw) &&
check_pw_minage(pb, &sdn, mod->mod_bvalues) == 1)
{
So minage is systematically tested when using EXTOP, while using direct MOD it is tested at the condition pw_must_change is not set (c_needpw is set if pw_must_change).
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://access.redhat.com/errata/RHBA-2017:2086