10.2. Troubleshooting smart card authentication with SSSD
Follow this procedure to troubleshoot authentication with SSSD using smart cards.
Prerequisites
- You have installed and configured your IdM Server and client for use with smart cards.
-
You have installed the
sssd-toolspackage. - You are able to detect your smart card reader and display the contents of your smart card. See Testing smart card access on the system.
Procedure
Verify you can authenticate with your smart card using
su:$ su - idmuser1 -c ‘su - idmuser1 -c whoami' PIN for MyEID (sctest): idmuser1If you are not prompted for the smart card PIN, and either a password prompt or an authorization error are returned, check the SSSD logs. See Troubleshooting authentication with SSSD in IdM for information about logging in SSSD. The following is an example of an authentication failure:
$ su - idmuser1 -c ‘su - idmuser1 -c whoami' PIN for MyEID (sctest): su: Authentication failureIf the SSSD logs indicate an issue from the
krb5_child, similar to the following, you may have an issue with your CA certificates. To troubleshoot issues with certificates, see Verifying that IdM Kerberos KDC can use Pkinit and that the CA certificates are correctly located.[Pre-authentication failed: Failed to verify own certificate (depth 0): unable to get local issuer certificate: could not load the shared library]If the SSSD logs indicate a timeout either from
p11_childorkrb5_child, you may need to increase the SSSD timeouts and try authenticating again with your smart card. See Increasing SSSD timeouts for details on how to increase the timeouts.Verify your GDM smart card authentication configuration is correct. A success message for PAM authentication should be returned as shown below:
# sssctl user-checks -s gdm-smartcard "idmuser1" -a auth user: idmuser1 action: auth service: gdm-smartcard SSSD nss user lookup result: - user name: idmuser1 - user id: 603200210 - group id: 603200210 - gecos: idm user1 - home directory: /home/idmuser1 - shell: /bin/sh SSSD InfoPipe user lookup result: - name: idmuser1 - uidNumber: 603200210 - gidNumber: 603200210 - gecos: idm user1 - homeDirectory: /home/idmuser1 - loginShell: /bin/sh testing pam_authenticate PIN for MyEID (sctest) pam_authenticate for user [idmuser1]: Success PAM Environment: - PKCS11_LOGIN_TOKEN_NAME=MyEID (sctest) - KRB5CCNAME=KCM:If an authentication error, similar to the following, is returned, check the SSSD logs to try and determine what is causing the issue. See Troubleshooting authentication with SSSD in IdM for information about logging in SSSD.
pam_authenticate for user [idmuser1]: Authentication failure PAM Environment: - no env -If PAM authentication continues to fail, clear your cache and run the command again.
# sssctl cache-remove SSSD must not be running. Stop SSSD now? (yes/no) [yes] yes Creating backup of local data… Removing cache files… SSSD needs to be running. Start SSSD now? (yes/no) [yes] yes