Bug 1459846

Summary: krb5: properly handle 'password expired' information retured by the KDC during PKINIT/Smartcard authentication
Product: Red Hat Enterprise Linux 7 Reporter: Jakub Hrozek <jhrozek>
Component: sssdAssignee: SSSD Maintainers <sssd-maint>
Status: CLOSED ERRATA QA Contact: Varun Mylaraiah <mvarun>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 7.3CC: grajaiya, jhrozek, ksiddiqu, lmiksik, lslebodn, mkosek, mzidek, pbrezina, sgoveas, tscherf
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: sssd-1.15.2-48.el7 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-08-01 09:06:23 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 Jakub Hrozek 2017-06-08 10:45:12 UTC
This bug is created as a clone of upstream ticket:
https://pagure.io/SSSD/sssd/issue/3419

Current during Smartcard/PKINIT authentication the PAM client gets confused by additional data which is send if the user password, which is not used for this authentication type, is expired.

Comment 2 Jakub Hrozek 2017-06-15 08:45:08 UTC
* master: 7e2ec7caa2d1c17e475fff78c5025496b8695509

Comment 6 Varun Mylaraiah 2017-06-22 06:15:23 UTC
Verified
sssd-1.15.2-50.el7.x86_64

[root@vm-idm-023 ~]# cat /etc/sssd/sssd.conf
[domain/testrelm.test]
krb5_use_enterprise_principal = True
cache_credentials = True
krb5_store_password_if_offline = True
ipa_domain = testrelm.test
id_provider = ipa
auth_provider = ipa
access_provider = ipa
ipa_hostname = vm-idm-023.testrelm.test
chpass_provider = ipa
ipa_server = _srv_, vm-idm-010.testrelm.test
ldap_tls_cacert = /etc/ipa/ca.crt
[sssd]
services = nss, sudo, pam, ssh

domains = testrelm.test
[nss]
homedir_substring = /home

[pam]

[sudo]

[autofs]

[ssh]

[pac]

[ifp]

[secrets]


[root@vm-idm-023 ~]# systemctl restart sssd.service


[root@vm-idm-023 ~]# ssh -l tuser localhost
Password: 
Password expired. Change your password now.
Current Password: 
New password: 
Retype new password: 
Last login: Thu Jun 22 11:34:58 2017 from ::1
**  **  **  **  **  **  **  **  **  **  **  **  **  **  **  **  **  **
                 This System is reserved by mvarun.

 To return this system early. You can run the command: return2beaker.sh
  Ensure you have your logs off the system before returning to Beaker

 To extend your reservation time. You can run the command:
  extendtesttime.sh
 This is an interactive script. You will be prompted for how many
  hours you would like to extend the reservation.

 You should verify the watchdog was updated succesfully after
  you extend your reservation.
  https://beaker.engineering.redhat.com/recipes/3976287

 For ssh, kvm, serial and power control operations please look here:
  https://beaker.engineering.redhat.com/view/vm-idm-023.testrelm.test

 For the default root password, see:
  https://beaker.engineering.redhat.com/prefs/

      Beaker Test information:
                         HOSTNAME=vm-idm-023.testrelm.test
                            JOBID=1918125
                         RECIPEID=3976287
                    RESULT_SERVER=[::1]:7094
                           DISTRO=RHEL-7.4-20170621.0
                     ARCHITECTURE=x86_64

      Job Whiteboard: IPA :: RHEL 7.4 :: Only Master and Client :: quickinstall :: with 99 hrs reserved

      Recipe Whiteboard: CLIENT1
**  **  **  **  **  **  **  **  **  **  **  **  **  **  **  **  **  **
Could not chdir to home directory /home/tuser: No such file or directory
-sh-4.2$

Comment 7 errata-xmlrpc 2017-08-01 09:06:23 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/RHEA-2017:2294