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 1819013 - pam_sss reports PAM_CRED_ERR when providing wrong password for an existing IPA user, but this error's description is misleading
Summary: pam_sss reports PAM_CRED_ERR when providing wrong password for an existing IP...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: sssd
Version: 7.7
Hardware: Unspecified
OS: Linux
medium
medium
Target Milestone: rc
: ---
Assignee: Iker Pedrosa
QA Contact: ipa-qe
URL:
Whiteboard: sync-to-jira
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-03-30 23:45 UTC by toasty
Modified: 2024-03-25 15:48 UTC (History)
17 users (show)

Fixed In Version: sssd-1.16.5-6.el7
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-09-29 19:50:00 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github SSSD sssd issues 5139 0 None closed pam_sss reports PAM_CRED_ERR when providing wrong password for an existing IPA user, but this error's description is mis... 2020-11-05 15:36:20 UTC
Red Hat Issue Tracker SSSD-2359 0 None None None 2024-03-25 15:48:08 UTC
Red Hat Issue Tracker SSSD-2369 0 None None None 2024-03-25 15:48:15 UTC
Red Hat Product Errata RHBA-2020:3904 0 None None None 2020-09-29 19:50:24 UTC

Description toasty 2020-03-30 23:45:11 UTC
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.

Comment 5 Pavel Březina 2020-05-15 08:41:47 UTC
* `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 11 Mohammad Rizwan 2020-05-28 14:00:47 UTC
Reproducer:
~~~~~~~~~~~

version:
ipa-client-4.6.5-11.el7_7.4.x86_64

[root@client ~]# cat /etc/redhat-release 
Red Hat Enterprise Linux Server release 7.7 (Maipo)

Steps:
1. Have an IPA server and client and add a user
2. Try to login to client using added user in 1 but with wrong password
3. see /var/log/secure

Actual result:

[root@client ~]# tail /var/log/secure
[..]
May 28 09:22:16 client sshd[4176]: pam_sss(sshd:auth): received for user testuser: 17 (Failure setting user credentials)
May 28 09:22:17 client sshd[4174]: error: PAM: Authentication failure for testuser from master.testrelm.test


May 28 09:22:55 client sshd[4180]: pam_sss(sshd:auth): authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=master.testrelm.test user=testuser
May 28 09:22:55 client sshd[4180]: pam_sss(sshd:auth): received for user testuser: 17 (Failure setting user credentials)
May 28 09:22:57 client sshd[4174]: error: PAM: Authentication failure for testuser from master.testrelm.test
May 28 09:22:57 client sshd[4174]: Postponed keyboard-interactive for testuser from 10.0.153.118 port 59372 ssh2 [preauth]



Fix:
~~~~

version:
[root@client ~]# cat /etc/redhat-release 
Red Hat Enterprise Linux Server release 7.9 Beta (Maipo)

ipa-client-4.6.8-3.el7.x86_64


[root@client ~]# tail /var/log/secure
[..]
May 28 09:44:45 client sshd[27014]: pam_sss(sshd:auth): authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=client.testrelm.test user=testuser
May 28 09:44:45 client sshd[27014]: pam_sss(sshd:auth): received for user testuser: 7 (Authentication failure)
May 28 09:44:48 client sshd[27012]: error: PAM: Authentication failure for testuser from client.testrelm.test
May 28 09:44:50 client sshd[27017]: pam_sss(sshd:auth): authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=client.testrelm.test user=testuser

Comment 12 Krzysztof Lubański 2020-06-11 15:24:28 UTC
Many thanks to everyone involved! I am the original submitter of this RFE in RH support case #02594543 - and glad that it's apparently on its way to be released even in RHEL 7.9. :)

Comment 16 errata-xmlrpc 2020-09-29 19:50:00 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 (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:3904

Comment 17 Krzysztof Lubański 2020-09-30 08:13:43 UTC
Thank you, everyone! Can you tell me where I could also monitor the inclusion of the fix into RHEL 8.3 (sssd 2.2 series)? This ticket only has the RHEL 7.9 inclusion tracked (sssd 1.16 series).

Comment 18 Iker Pedrosa 2020-09-30 08:21:37 UTC
AFAIK, it has been included in sssd 2.3 release, which will be included in RHEL 8.3.

Comment 19 Krzysztof Lubański 2020-09-30 08:59:48 UTC
Thanks, Iker! Could you or someone else set this ticket to track that RHEL 8.3 version now? Or create another ticket for that purpose, if you want to keep this one CLOSED ERRATA (marking the RHEL 7.3 version done)?

Comment 20 Iker Pedrosa 2020-09-30 09:50:05 UTC
It's already created but I misplaced it somehow: https://bugzilla.redhat.com/show_bug.cgi?id=1837408

Comment 21 Krzysztof Lubański 2020-09-30 11:34:54 UTC
Great. Thank you, Iker! I got myself on Cc: there, and all clear here.


Note You need to log in before you can comment on or make changes to this bug.