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.
DescriptionAlexey Tikhonov
2020-05-19 13:00:19 UTC
This bug was initially created as a copy of Bug #1819013
I am copying this bug because: to track fix for RHEL8
Description of problem:
pam_sss reports PAM_CRED_ERR when providing wrong password for an existing IPA user, but this error's description is misleading
Version-Release number of selected component (if applicable):
RHEL 6.10, RHEL 7.7 (haven't checked on RHEL 8)
How reproducible:
Steps to Reproduce:
1. Have an IPA server and an IPA client (both can be the same system RHEL 6.10 or 7.7).
2. Create a user in IPA with HBAC rules allowing him to login to the client (not sure if the rule is necessary).
3. Try to log into the client, providing the user's name but a wrong password.
Actual results:
In /var/log/secure on the client, pam_sss reports error "17 (Failure setting user credentials)", that is PAM_CRED_ERR.
Expected results:
pam_sss reports error PAM_AUTH_ERR ("Authentication failure").
Additional info:
PAM_CRED_ERR's description message, "Failure setting user credentials", suggest some internal error in the PAM&modules execution path when setting credentials for an already authenticated user.
This has led our teams many times to waste time debugging sssd and IPA server to diagnose users' access issues, thinking the problem lies there, while the actual issue was the user providing an incorrect password.
PAM_AUTH_ERR with its message "Authentication failure", instead, clearly states that the problem was at the authentication stage, so most probably the username and password did not match an existing account. This would make resolving such issues much faster thanks to the error message pointing to the problem area more clearly.
* `master`
* 49b9ca15866f59d6e3c1b572545d1b9e76625892 - ipa_auth and krb5_auth: when providing wrong password return PAM_AUTH_ERR
* `sssd-1-16`
* b1185573e31f08d4d37ae763b5d7e7f0a37e1244 - ipa_auth and krb5_auth: when providing wrong password return PAM_AUTH_ERR
Comment 4Niranjan Mallapadi Raghavender
2020-08-05 11:26:04 UTC
Versions:
ipa-client-4.8.7-7.module+el8.3.0+7376+c83e4fcd.x86_64
sssd-ipa-2.3.0-6.el8.x86_64
1. On ipa server, create a hbac rule to allow foobar2 user only on client.example.test
[root@server ~]# ipa hbacrule-show test_wrong_passwd
Rule name: test_wrong_passwd
Enabled: TRUE
Users: foobar2
Hosts: client.example.test
HBAC Services: sshd
2. Login as user foobar2 with wrong password.
Aug 5 16:50:47 vm-idm-010 sshd[99871]: pam_sss(sshd:auth): authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=10.67.116.34 user=foobar2
Aug 5 16:50:47 vm-idm-010 sshd[99871]: pam_sss(sshd:auth): received for user foobar2: 7 (Authentication failure)
Aug 5 16:50:49 vm-idm-010 sshd[99858]: error: PAM: Authentication failure for foobar2 from 10.67.116.34
Aug 5 16:50:49 vm-idm-010 sshd[99858]: Connection closed by authenticating user foobar2 10.67.116.34 port 59532 [preauth]
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 (sssd bug fix and enhancement update), 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-2020:4569
Comment 8Krzysztof LubaĆski
2020-12-07 14:45:38 UTC
Hi,
Again thank you to everyone involved for getting this fixed, tested and released! (I'm the original submitter of the RFE for this through Red Hat Support.)
Cheers,
Krzysztof