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 1170352 - pam_sss.so doesn't support KEYRING Kerberos credential caches
Summary: pam_sss.so doesn't support KEYRING Kerberos credential caches
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: sssd
Version: 7.0
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: SSSD Maintainers
QA Contact: Kaushik Banerjee
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-12-03 21:04 UTC by James Ralston
Modified: 2014-12-11 08:52 UTC (History)
10 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-12-11 07:59:29 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description James Ralston 2014-12-03 21:04:59 UTC
Description of problem:

If I place the following configuration directive in the [libdefaults] section of /etc/krb5.conf:

    default_ccache_name = KEYRING:persistent:%U

...and adjust the PAM stack for system-auth so that pam_sss.so is used instead of pam_krb5.so, KRB5CCNAME is set to FILE:/tmp/krb5cc_12345_XXXXXX, where "12345" is my uid, and "XXXXXX" is randomized by mkstemp(3).

In other words, pam_sss.so uses the traditional default for KRB5CCNAME, instead of obeying /etc/krb5.conf that specifies a keyring ccache type by default.

I tried setting krb5_ccname_template in /etc/sssd/sssd.conf to the same value (instead of leaving it unset and letting the krb5 lib default apply), but the result is the same, for both the "ad" and "krb5" provider.

If I switch back to using pam_krb5.so, it works perfectly: when I login, KRB5CCNAME is set to KEYRING:persistent:12345 (where "12345" is my uid).

Version-Release number of selected component (if applicable):

0:krb5-libs-1.11.3-49.el7.x86_64
0:krb5-workstation-1.11.3-49.el7.x86_64
0:sssd-1.11.2-68.el7_0.6.x86_64

How reproducible:

Use pam_sss.so instead of pam_krb5.so.

Actual results:

pam_sss.so ignores the default_ccache_name setting in /etc/krb5.conf and instead uses the traditional FILE: cache.

Expected results:

pam.sss.so should obey default_ccache_name, like pam_krb5.so does.

Comment 1 Jakub Hrozek 2014-12-03 21:14:39 UTC
Does it work if you /comment out/ the krb5.conf settings? IIRC the el7 defaults are KEYRING.

If not, can you put debug_level=7 into the [pam] and [domain] sections, attempt to log in and attach the logs from /var/log/sssd/ ?

thanks!

Comment 3 Jakub Hrozek 2014-12-04 08:47:20 UTC
About the defaults -- you were right on IRC, sorry. For some reason, I thought the KEYRING default was set on the libkrb5 level, not in krb5.conf and wanted to verify it wasn't different in some way from what you had in krb5.conf. Sorry for the noise.

Comment 4 Sumit Bose 2014-12-04 14:27:13 UTC
Please note that %U is a template from sssd.conf. I think in krb5.conf is should be %{uid}.

Comment 5 Lukas Slebodnik 2014-12-04 15:34:09 UTC
(In reply to Sumit Bose from comment #4)
> Please note that %U is a template from sssd.conf. I think in krb5.conf is
> should be %{uid}.
+1 

I have line "default_ccache_name = KEYRING:persistent:%{uid}" in my krb5.conf
and it works well.

Comment 6 James Ralston 2014-12-10 23:04:55 UTC
Yes; that was the problem; I had "%{U}" in /etc/krb5.conf when I needed %{uid}.

I apologize for the noise, but it's not very helpful that krb5.conf and sssd.conf have two almost-identical ways to specify the same thing.  :-(

Comment 7 James Ralston 2014-12-10 23:08:14 UTC
Sigh, submitters don't appear to be able to close RHEL bugs anymore. Someone close as NOTABUG, please.

Comment 8 Sumit Bose 2014-12-11 07:59:29 UTC
Thank you for the feedback. I agree that the different templates are a bit confusing, but we used one-letter templates in SSSD in other places and tried to be compatible with the one-letter scheme used by pam_krb5 as well.

Closeing as requested as NOTABUG.

Comment 9 Lukas Slebodnik 2014-12-11 08:04:17 UTC
Maybe we can mention in description of the option krb5_ccname_template (man sssd-krb5) that libkrb5 uses different syntax for template.

Comment 10 Jakub Hrozek 2014-12-11 08:52:37 UTC
(In reply to Lukas Slebodnik from comment #9)
> Maybe we can mention in description of the option krb5_ccname_template (man
> sssd-krb5) that libkrb5 uses different syntax for template.

Good idea:
https://fedorahosted.org/sssd/ticket/2528


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