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 1411944 - Release 1.3.5 may allow expired accounts access to systems
Summary: Release 1.3.5 may allow expired accounts access to systems
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: 389-ds-base
Version: 7.3
Hardware: All
OS: Linux
urgent
urgent
Target Milestone: rc
: ---
Assignee: mreynolds
QA Contact: Viktor Ashirov
URL:
Whiteboard:
Depends On:
Blocks: 1414679
TreeView+ depends on / blocked
 
Reported: 2017-01-10 19:45 UTC by Gordon Messmer
Modified: 2020-09-13 21:55 UTC (History)
5 users (show)

Fixed In Version: 389-ds-base-1.3.6.1-3.el7
Doc Type: No Doc Update
Doc Text:
See the 7.3.z bug 1414679.
Clone Of:
: 1414679 (view as bug list)
Environment:
Last Closed: 2017-08-01 21:14:10 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github 389ds 389-ds-base issues 2139 0 None None None 2020-09-13 21:55:29 UTC
Github 389ds 389-ds-base issues 2141 0 None None None 2020-09-13 21:55:34 UTC
Red Hat Product Errata RHBA-2017:2086 0 normal SHIPPED_LIVE 389-ds-base bug fix and enhancement update 2017-08-01 18:37:38 UTC

Description Gordon Messmer 2017-01-10 19:45:02 UTC
Description of problem:
Release 1.3.5 of 389-ds changed handling of the shadowExpire attribute and other shadow-related attributes.  Calculation of shadowExpire will replace the value in the LDAP database with a value that represents the current date plus the maximum age of a password.  Because this date will always be in the future, accounts which were expired and not allowed to log in under previous releases of 389-ds will be allowed to log in under 1.3.5.

Version-Release number of selected component (if applicable):
389-ds-base-1.3.5.10-12.el7_3.x86_64

How reproducible:
Always

Steps to Reproduce:
1. set shadowExpire value to past date for an account
2. attempt to log in to that account

Actual results:
User can log in.

Expected results:
User should be denied login because the account is expired.

Additional info:
https://fedorahosted.org/389/ticket/49080

Comment 4 Sankar Ramalingam 2017-05-16 02:36:01 UTC
Ran upstream test ticket548_test.py.

INFO:dirsrvtests.tests.tickets.ticket548_test:		Add the password policy subentry {passwordMustChange: on, passwordMinAge: 4, passwordMaxAge: 40, passwordWarning: 12}
INFO:dirsrvtests.tests.tickets.ticket548_test:		Add the COS template
ERROR:dirsrvtests.tests.tickets.ticket548_test:Failed to add COS template: error Already exists
INFO:dirsrvtests.tests.tickets.ticket548_test:		Add the COS definition
ERROR:dirsrvtests.tests.tickets.ticket548_test:Failed to add COS def: error Already exists
INFO:dirsrvtests.tests.tickets.ticket548_test:		Bind as {uid=user3,dc=example,dc=com,password}
INFO:dirsrvtests.tests.tickets.ticket548_test:Re-bind as uid=user3,dc=example,dc=com with new password
INFO:dirsrvtests.tests.tickets.ticket548_test:Expecting shadowLastChange 17302 once userPassword is updated
INFO:dirsrvtests.tests.tickets.ticket548_test:shadowLastChange of entry uid=user3,dc=example,dc=com has expected value 17302
INFO:dirsrvtests.tests.tickets.ticket548_test:Search entry uid=user3,dc=example,dc=com
INFO:dirsrvtests.tests.tickets.ticket548_test:shadowLastChange of entry uid=user3,dc=example,dc=com has expected value 17302
INFO:dirsrvtests.tests.tickets.ticket548_test:shadowMin of entry uid=user3,dc=example,dc=com has expected value 4
INFO:dirsrvtests.tests.tickets.ticket548_test:shadowMax of entry uid=user3,dc=example,dc=com has expected value 40
INFO:dirsrvtests.tests.tickets.ticket548_test:shadowWarning of entry uid=user3,dc=example,dc=com has expected value 12
INFO:dirsrvtests.tests.tickets.ticket548_test:Check shadowAccount with subtree level policy was successfully verified.
PASSEDInstance slapd-standalone_1 removed.


=================== 3 passed in 8.32 seconds ==================

Comment 5 Sankar Ramalingam 2017-05-16 03:12:35 UTC
Manually checked if setting shadowExpire attributes affect the password expired accounts. It doesn't have any effect. Hence, marking the bug as Verified.

[0 root@qeos-43 389ds-replica]# cat /export/pwdexp.ldif 
dn: cn=config
replace: passwordexp
passwordexp: on
-
replace: passwordmaxage
passwordmaxage: 12
-
replace: passwordwarning
passwordwarning: 1

[0 root@qeos-43 389ds-replica]# ldapmodify -x -D "cn=Directory Manager" -w Secret123 -h localhost -p 1389 -vf /export/pwdexp.ldif 

[0 root@qeos-43 389ds-replica]# ldapsearch -x -D "cn=Directory Manager" -w Secret123 -h localhost -p 1389 -b "dc=testpw,dc=com" |grep -i shadow
objectClass: shadowAccount
shadowLastChange: 17302
objectClass: shadowAccount
shadowLastChange: 17302

[0 root@qeos-43 389ds-replica]# ldapsearch -x -D "uid=tttu2,ou=People,dc=testpw,dc=com" -w Secret123 -h localhost -p 1389 -b "dc=testpw,dc=com" 
ldap_bind: Invalid credentials (49)
	additional info: password expired!

[0 root@qeos-43 389ds-replica]# ldapmodify -x -D "cn=Directory Manager" -w Secret123 -h localhost -p 1389 <<
-bash: syntax error near unexpected token `newline'
[0 root@qeos-43 389ds-replica]# ldapmodify -x -D "cn=Directory Manager" -w Secret123 -h localhost -p 1389 << EE
> dn: uid=tttu3,ou=People,dc=testpw,dc=com
> replace: shadowExpire
> shadowExpire: 17390
> EE
modifying entry "uid=tttu3,ou=People,dc=testpw,dc=com"

[0 root@qeos-43 389ds-replica]# ldapsearch -x -D "uid=tttu3,ou=People,dc=testpw,dc=com" -w Secret123 -h localhost -p 1389 -b "dc=testpw,dc=com" 
ldap_bind: Invalid credentials (49)
	additional info: password expired!
[0 root@qeos-43 389ds-replica]# ldapmodify -x -D "cn=Directory Manager" -w Secret123 -h localhost -p 1389 << EEdn: uid=tttu3,ou=People,dc=testpw,dc=com
replace: shadowExpire
shadowExpire: 17090
EE

modifying entry "uid=tttu3,ou=People,dc=testpw,dc=com"

[0 root@qeos-43 389ds-replica]# ldapsearch -x -D "uid=tttu3,ou=People,dc=testpw,dc=com" -w Secret123 -h localhost -p 1389 -b "dc=testpw,dc=com" 
ldap_bind: Invalid credentials (49)
	additional info: password expired!

[0 root@qeos-43 389ds-replica]# ldapsearch -x -D "uid=tttu3,ou=People,dc=testpw,dc=com" -w Secret123 -h localhost -p 1389 -b "dc=testpw,dc=com" 
ldap_bind: Invalid credentials (49)
	additional info: password expired!
[0 root@qeos-43 389ds-replica]# ldapmodify -x -D "cn=Directory Manager" -w Secret123 -h localhost -p 1389 << EEdn: uid=tttu3,ou=People,dc=testpw,dc=com
replace: shadowLastChange
shadowLastChange: 17090
EE

modifying entry "uid=tttu3,ou=People,dc=testpw,dc=com"

[0 root@qeos-43 389ds-replica]# ldapsearch -x -D "uid=tttu3,ou=People,dc=testpw,dc=com" -w Secret123 -h localhost -p 1389 -b "dc=testpw,dc=com" 
ldap_bind: Invalid credentials (49)
	additional info: password expired!
[0 root@qeos-43 389ds-replica]# ldapmodify -x -D "cn=Directory Manager" -w Secret123 -h localhost -p 1389 << EEdn: uid=tttu3,ou=People,dc=testpw,dc=com
replace: shadowLastChange
shadowLastChange: 17990
EE

modifying entry "uid=tttu3,ou=People,dc=testpw,dc=com"

[0 root@qeos-43 389ds-replica]# ldapsearch -x -D "uid=tttu3,ou=People,dc=testpw,dc=com" -w Secret123 -h localhost -p 1389 -b "dc=testpw,dc=com" 
ldap_bind: Invalid credentials (49)
	additional info: password expired!


[0 root@qeos-43 389ds-replica]# rpm -qa |grep -i 389-ds
389-ds-base-debuginfo-1.3.6.1-13.el7.x86_64
389-ds-base-libs-1.3.6.1-13.el7.x86_64
389-ds-base-1.3.6.1-13.el7.x86_64

Comment 6 Gordon Messmer 2017-05-16 23:34:28 UTC
This bug cannot be verified in that manner.  The shadowExpire does not affect, and should not affect, LDAP bind operations.  That attribute is used by the PAM stack to lock out accounts that have expired.

Comment 7 errata-xmlrpc 2017-08-01 21:14:10 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://access.redhat.com/errata/RHBA-2017:2086


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