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 1111528

Summary: Expired shadow policy user(shadowLastChange=0) is not prompted for password change
Product: Red Hat Enterprise Linux 6 Reporter: Kaushik Banerjee <kbanerje>
Component: sssdAssignee: Jakub Hrozek <jhrozek>
Status: CLOSED ERRATA QA Contact: Kaushik Banerjee <kbanerje>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 6.6CC: apeetham, dpal, grajaiya, jgalipea, kbanerje, lslebodn, mkosek, pbrezina, preichl, tvaughan
Target Milestone: rcKeywords: Regression
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: sssd-1.11.6-25.el6 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 1089250 Environment:
Last Closed: 2014-10-14 04:48:53 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1089250    
Bug Blocks:    

Comment 1 Jakub Hrozek 2014-08-20 14:45:52 UTC
This is a regression caused by rewrite of the error codes in 1.10

Comment 2 Jakub Hrozek 2014-08-20 15:41:51 UTC
Here is a test build:
http://brewweb.devel.redhat.com/brew/taskinfo?taskID=7863299

It would be nice if QE could confirm the fix helps.

Comment 3 Kaushik Banerjee 2014-08-21 09:18:02 UTC
(In reply to Jakub Hrozek from comment #2)
> Here is a test build:
> http://brewweb.devel.redhat.com/brew/taskinfo?taskID=7863299
> 
> It would be nice if QE could confirm the fix helps.

Works with the scratch build. User is now prompted for the password change. Thanks Jakub.

Comment 4 Jakub Hrozek 2014-08-21 09:22:52 UTC
(In reply to Kaushik Banerjee from comment #3)
> (In reply to Jakub Hrozek from comment #2)
> > Here is a test build:
> > http://brewweb.devel.redhat.com/brew/taskinfo?taskID=7863299
> > 
> > It would be nice if QE could confirm the fix helps.
> 
> Works with the scratch build. User is now prompted for the password change.
> Thanks Jakub.

Thank you very much for testing. I will build an official package once the patch is merged upstream.

Comment 8 Kaushik Banerjee 2014-08-28 09:20:21 UTC
Verified with sssd-1.11.6-28.el6

Output from beaker run:
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: [   LOG    ] :: shadow7: Account expired
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
modifying entry "uid=shadowuser1,ou=Users,dc=example,dc=com"

Stopping sssd: [  OK  ]
Starting sssd: [  OK  ]

spawn ssh -o StrictHostKeyChecking=no -l shadowuser1 localhost
shadowuser1@localhost's password: 
Password expired. Change your password now.
WARNING: Your password has expired.
You must change your password now and login again!
Changing password for user shadowuser1.
Current Password: 
New password: 
Retype new password: 
:: [   LOG    ] :: Sleeping for 5 seconds
:: [   PASS   ] :: File '/var/log/sssd/sssd_LDAP.log' should contain 'Found shadow password expiration attributes' 
:: [   PASS   ] :: File '/var/log/sssd/sssd_LDAP.log' should contain 'Last change day is not set, new password needed' 
:: [   PASS   ] :: File '/var/log/sssd/sssd_LDAP.log' should contain 'Initial authentication for change password operation successful' 
:: [   LOG    ] :: Duration: 9s
:: [   LOG    ] :: Assertions: 3 good, 0 bad
:: [   PASS   ] :: RESULT: shadow7: Account expired

Comment 9 errata-xmlrpc 2014-10-14 04:48:53 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.

http://rhn.redhat.com/errata/RHBA-2014-1375.html

Comment 10 Trevor Vaughan 2015-11-19 21:53:58 UTC
I know that this is closed, but when performing the test above, did the user have a valid SSH key in LDAP?

Is the user still prompted for a password change if they do have a valid SSH key?

If they are not, this is a deviation from the way that NSCD has always functioned.

Thanks,

Trevor