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.

Bug 1846003

Summary: GDM password prompt when cert mapped to multiple users and promptusername is False
Product: Red Hat Enterprise Linux 8 Reporter: Alexey Tikhonov <atikhono>
Component: sssdAssignee: Sumit Bose <sbose>
Status: CLOSED ERRATA QA Contact: sssd-qe <sssd-qe>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 8.2CC: grajaiya, jhrozek, lslebodn, mzidek, pbrezina, sgoveas, spoore, thalman, tscherf
Target Milestone: rcKeywords: Triaged
Target Release: ---Flags: pm-rhel: mirror+
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: sync-to-jira
Fixed In Version: sssd-2.3.0-3.el8 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-11-04 02:05:29 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Alexey Tikhonov 2020-06-10 14:52:23 UTC
This bug was initially created as a copy of Bug #1507683

I am copying this bug because: to track fix for RHEL8



Description of problem:

Smart Card login to GDM on IPA client with certificate mapped to multiple users is behaving unexpectedly when promptusername is set to False.  When I insert the card and GDM at login screen, it blanks.  Then it goes to a "Password" prompt.  There is no indication of which user this is for.  

Version-Release number of selected component (if applicable):
gdm-3.22.3-12.el7.x86_64
sssd-1.15.2-50.el7_4.6.x86_64
ipa-client-4.5.0-21.el7_4.2.2.x86_64


How reproducible:
always on my local test VMs.

Steps to Reproduce:
1. Setup IPA server and client with smart card cert mapped to two users

2. set promptusername to false

ipa certmapconfig-mod --promptusername=False
 
3. Connect smart card reader to client and insert card

Actual results:

password prompt

Expected results:

error message or simply return to user list login screen.

Additional info:

Comment 1 Alexey Tikhonov 2020-06-10 14:55:19 UTC
* `master`
    * 3ed254765fc92e9cc9e4c35335818eaf1256e0d6 - pam_sss: special handling for gdm-smartcard
    * 26c794da31c215fef3e41429f6f13afdaf349bee - pam_sss: add SERVICE_IS_GDM_SMARTCARD

Comment 3 Pavel Březina 2020-06-24 14:18:17 UTC
Additional commit:

Pushed PR: https://github.com/SSSD/sssd/pull/5212

* `master`
    * 31e57432537b9d248839159d83cfa9049faf192b - pam_sss: make sure old certificate data is removed before retry

Comment 6 Scott Poore 2020-08-07 17:31:41 UTC
Verified.

Version::

sssd-client-2.3.0-6.el8.x86_64

Results ::


[root@rhel8-8 usercert]# ipa certmapconfig-mod --promptusername=False
  Prompt for the username: FALSE

[root@rhel8-8 usercert]# ipa certmap-match ipauser1.crt
---------------
2 users matched
---------------
  Domain: SMARTCARD.TEST
  User logins: ipauser1, ipauser2
----------------------------
Number of entries returned 1
----------------------------

[root@rhel8-8 usercert]# systemctl stop sssd; rm -rf /var/lib/sss/{db,mc}/*; systemctl start sssd

[root@rhel8-8 usercert]# systemctl restart gdm

Now remove card from reader before gdm restarts
Insert card when gdm comes up
GDM prompted for PIN
when I enter pin, I see the "Sorry, that didn't work.  Please try again".

This is expected behavior wth the patch.

Comment 9 errata-xmlrpc 2020-11-04 02:05:29 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:4569