Hide Forgot
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:
Changing the Product to RHEL since the Password policy belongs to 389-ds-base.
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).
Upstream ticket: https://fedorahosted.org/389/ticket/49039
Fixed upstream
Regression - internal password updates cause crash
*** Bug 1438724 has been marked as a duplicate of this bug. ***
======================= test session starts =================================================== platform linux2 -- Python 2.7.5, pytest-3.0.7, py-1.4.33, pluggy-0.4.0 -- /usr/bin/python cachedir: .cache metadata: {'Python': '2.7.5', 'Platform': 'Linux-3.10.0-657.el7.x86_64-x86_64-with-redhat-7.4-Maipo', 'Packages': {'py': '1.4.33', 'pytest': '3.0.7', 'pluggy': '0.4.0'}, 'Plugins': {'beakerlib': '0.7.1', 'html': '1.14.2', 'cov': '2.4.0', 'metadata': '1.3.0'}} DS build: 1.3.6.1 389-ds-base: 1.3.6.1-9.el7 nss: 3.28.4-3.el7 nspr: 4.13.1-1.0.el7_3 openldap: 2.4.44-4.el7 svrcore: 4.1.3-2.el7 rootdir: /export/tests, inifile: plugins: metadata-1.3.0, html-1.14.2, cov-2.4.0, beakerlib-0.7.1 collected 1 items tickets/ticket49039_test.py::test_ticket49039 PASSED
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