Red Hat Enterprise Linux Diagnostics and Troubleshooting
Repair an authentication issue.
Outcomes
You should be able to successfully repair an authentication issue.
As the student user on the workstation machine, use the lab command to prepare your system for this exercise.
This command configures your system as an IdM client.
[student@workstation ~]$ lab start compreview-review3
Specifications
The
serverasystem is an IdM client for user authentication.The IdM server is
utility.lab.example.com.The IdM server authenticates the
adminandoperator1users.The
operator1user reports that they cannot log in.The
operator1user should be able to log in without a password prompt.The password for the
operator1andadminuser accounts isRedHat123^.
Re-create the issue. From the
workstationmachine, attempt to log in to theoperator1account on theserveramachine. The login either fails to connect or presents a password prompt. Press Ctrl+C at any time to exit the authentication process.The following output is an example of incorrect behavior:
[student@workstation ~]$
ssh operator1@serveraConnection closed by 172.25.250.10 port 22The following output is another possible example of incorrect behavior:
[student@workstation ~]$
ssh operator1@serveraPassword:RedHat123^Password:RedHat123^Password:RedHat123^operator1@servera's password:RedHat123^Permission denied, please try again. operator1@servera's password:RedHat123^Received disconnect from 172.25.250.10 port 22:2: Too many authentication failures Disconnected from 172.25.250.10 port 22 [student@workstation ~]$
Log in to
servera.As the
studentuser on theworkstationmachine, log in to theserveramachine and switch to therootuser.[student@workstation ~]$
ssh student@servera...output omitted... [student@servera ~]$sudo -i[sudo] password for student:student[root@servera ~]#
Ensure that the Identity Management service is providing Kerberos tickets.
Use the
kinit admincommand to authenticate and obtain Kerberos credentials. When prompted, useRedHat123^as the password.[root@servera ~]#
kinit adminPassword for admin@LAB.EXAMPLE.COM:RedHat123^Use the
klistcommand to verify that the Kerberos ticket is created.[root@servera ~]#
klistTicket cache: KCM:0 Default principal: admin@LAB.EXAMPLE.COM Valid starting Expires Service principal 11/23/2021 20:50:11 11/24/2021 20:50:06 krbtgt/LAB.EXAMPLE.COM@LAB.EXAMPLE.COM
The previous step indicates that both LDAP and Kerberos are functioning normally, so the problem might be the SSSD configuration. Clear the SSSD log files on the
serveramachine and attempt to log in as theoperator1user to generate fresh logs. Search the log files for possible errors.Enable detailed SSSD debug logging.
[root@servera ~]#
sssctl debug-level 6Invalidate all objects in the SSSD cache.
[root@servera ~]#
sss_cache -EClear previous SSSD logs to minimize the troubleshooting data set.
[root@servera ~]#
sssctl logs-removeTruncating log files...From a new terminal on
workstation, attempt to log in to theoperator1user account to regenerate the error.[student@workstation ~]$
ssh operator1@serveraConnection closed by 172.25.250.10 port 22On
servera, review the SSSD logs for information about a failed request.The log file indicates that no rules were found for the host.
[root@servera ~]#
tail /var/log/sssd/sssd_lab.example.com.log(2021-11-23 21:51:12): [be[lab.example.com]] [sdap_account_expired] (0x0400): IPA access control succeeded, checking AD access control (2021-11-23 21:51:12): [be[lab.example.com]] [sdap_account_expired_ad] (0x0400): Performing AD access check for user [operator1@lab.example.com] (2021-11-23 21:51:12): [be[lab.example.com]] [sdap_get_generic_ext_step] (0x0400): calling ldap_search_ext with [(&(objectClass=ipaHost)(fqdn=serverc.lab.example.com))][cn=accounts,dc=lab,dc=example,dc=com]. (2021-11-23 21:51:12): [be[lab.example.com]] [sdap_get_generic_op_finished] (0x0400): Search result: Success(0), no errmsg set (2021-11-23 21:51:12): [be[lab.example.com]] [ipa_pam_access_handler_done] (0x0020):No HBAC rules found, denying access(2021-11-23 21:51:12): [be[lab.example.com]] [dp_req_done] (0x0400): DP Request [PAM Account #9]: Request handler finished [0]: Success (2021-11-23 21:51:12): [be[lab.example.com]] [_dp_req_recv] (0x0400): DP Request [PAM Account #9]: Receiving request data. (2021-11-23 21:51:12): [be[lab.example.com]] [dp_req_destructor] (0x0400): DP Request [PAM Account #9]: Request removed. (2021-11-23 21:51:12): [be[lab.example.com]] [dp_req_destructor] (0x0400): Number of active DP request: 0 (2021-11-23 21:51:12): [be[lab.example.com]] [sbus_issue_request_done] (0x0400): sssd.dataprovider.pamHandler: Success
Check and repair any issues in the
/etc/sssd/sssd.conffile.Inspect the file. The
ipa_hostnameparameter is incorrect. Fix the parameter so that it matches the following output.[root@servera ~]#
cat /etc/sssd/sssd.conf | grep ipa_hostnameipa_hostname = servera.lab.example.comRestart the
sssdservice.[root@servera ~]#
systemctl restart sssd
Verify that the
operator1user is not prompted for a password when logging in to theserveramachine.From the additional terminal on
workstation, log in to theoperator1account on theserveramachine.The login is successful. Exit the terminal when connected.
[student@workstation ~]$
ssh operator1@servera...output omitted... [operator1@servera ~]$exitClose the terminal that is connected to
serveraand return toworkstationas thestudentuser.[root@servera ~]#
exit[student@servera ~]$exit[student@workstation ~]$