Bug 985016
Summary: | Credential cache directory /run/user/0/krb5cc does not exist | ||
---|---|---|---|
Product: | Red Hat Enterprise Linux 7 | Reporter: | Scott Poore <spoore> |
Component: | krb5 | Assignee: | Nalin Dahyabhai <nalin> |
Status: | CLOSED CURRENTRELEASE | QA Contact: | Patrik Kis <pkis> |
Severity: | high | Docs Contact: | |
Priority: | high | ||
Version: | 7.0 | CC: | abokovoy, amarecek, dpal, jmontleo, j, ksrot, nalin, nathaniel, pasik, pkis, rcritten, riehecky, sgallagh, spoore, ssorce, stefw, xdong, yelley |
Target Milestone: | rc | Keywords: | TestBlocker |
Target Release: | --- | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | krb5-1.11.3-16.el7 | Doc Type: | Bug Fix |
Doc Text: | Story Points: | --- | |
Clone Of: | 961235 | Environment: | |
Last Closed: | 2014-06-13 10:00:03 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: | |||
Bug Depends On: | 961235, 961510, 967509 | ||
Bug Blocks: | 949853, 965419, 977972 |
Description
Scott Poore
2013-07-16 14:54:05 UTC
This is not a bug in IPA, moving to krb5 component (the same component as the original Bug 961235). As noted above, a general fix isn't something I know how to do in here without replicating the privileged-server-being-asked-to-do-something part of the pam_systemd/logind combination that handles this most of the time. But we'll at least be able to paper over it for the specific case of user 0 in krb5-1.11.3-4.el7. Quick check on a test box of mine and this appears to be fixed: [root@rhel7-5 user]# rpm -qf /usr/bin/kinit krb5-workstation-1.11.3-9.el7.x86_64 [root@rhel7-5 user]# rm -rf /run/user/0 [root@rhel7-5 user]# pwd /run/user [root@rhel7-5 user]# ls [root@rhel7-5 user]# kinit kinit: Configuration file does not specify default realm when parsing name root [root@rhel7-5 user]# find . . ./0 ./0/krb5cc ./0/krb5cc/primary So, looks like I can probably remove the IPA tests workaround that pre-creates that. issue reappears in newest krb5 : [root@nec-em9 ~]# rpm -qf /usr/bin/kinit krb5-workstation-1.11.3-14.el7.x86_64 [root@nec-em9 ~]# klist -l klist: No credentials cache found while getting default ccache [root@nec-em9 ~]# rm -rf /run/user/0 [root@nec-em9 ~]# kinit admin kinit: Credential cache directory /run/user/0/krb5cc does not exist while getting default ccache Originally this was only going to be something we tweaked while the default was DIR:, but I guess we need it. Made it unconditional as of krb5-1.11.3-16.el7. Nalin, Does this mean the default is back to something more like this? FILE:/tmp/krb5cc_$(id -u) That's what it seems like from a quick check: [root@rhel7-1 user]# rpm -qf /usr/bin/klist krb5-workstation-1.11.3-27.el7.x86_64 [root@rhel7-1 user]# unset KRB5CCNAME [root@rhel7-1 user]# klist klist: No credentials cache found (ticket cache FILE:/tmp/krb5cc_0) [root@rhel7-1 user]# kinit admin Password for admin.TEST: [root@rhel7-1 user]# klist Ticket cache: FILE:/tmp/krb5cc_0 Default principal: admin.TEST Valid starting Expires Service principal 11/04/2013 11:26:20 11/05/2013 11:26:18 krbtgt/IPA1.EXAMPLE.TEST.TEST Thanks, Scott (In reply to Scott Poore from comment #10) > Nalin, > > Does this mean the default is back to something more like this? > > FILE:/tmp/krb5cc_$(id -u) No, the configured default should be KEYRING:persistent:%{uid}. Is there a value set for "default_ccache_name" in your /etc/krb5.conf's [libdefaults] section? > That's what it seems like from a quick check: > > [root@rhel7-1 user]# rpm -qf /usr/bin/klist > krb5-workstation-1.11.3-27.el7.x86_64 The configuration file is owned by krb5-libs. Please check its version, and if you upgraded from a previous version of the package, if a trigger to edit the file and add the default would have been invoked as part of the upgrade from that previous version. (In reply to Nalin Dahyabhai from comment #11) > (In reply to Scott Poore from comment #10) > > Nalin, > > > > Does this mean the default is back to something more like this? > > > > FILE:/tmp/krb5cc_$(id -u) > > No, the configured default should be KEYRING:persistent:%{uid}. Is there a > value set for "default_ccache_name" in your /etc/krb5.conf's [libdefaults] > section? No, doesn't look like it: [root@rhel7-5 conf.d]# grep default_ccache_name /etc/krb5.conf [root@rhel7-5 conf.d]# > > > That's what it seems like from a quick check: > > > > [root@rhel7-1 user]# rpm -qf /usr/bin/klist > > krb5-workstation-1.11.3-27.el7.x86_64 > > The configuration file is owned by. Please check its version, and > if you upgraded from a previous version of the package, if a trigger to edit > the file and add the default would have been invoked as part of the upgrade > from that previous version. [root@rhel7-5 conf.d]# rpm -q krb5-libs krb5-libs-1.11.3-27.el7.x86_64 No upgrade from what I can tell. Looks like was built with that version: [root@rhel7-5 log]# grep -i "INFO packaging: krb5-libs" /var/log/anaconda/anaconda.packaging.log 19:57:48,698 INFO packaging: krb5-libs-1.11.3-27.el7.x86_64 (136/298) (In reply to Scott Poore from comment #12) > No upgrade from what I can tell. Looks like was built with that version: > > [root@rhel7-5 log]# grep -i "INFO packaging: krb5-libs" > /var/log/anaconda/anaconda.packaging.log > 19:57:48,698 INFO packaging: krb5-libs-1.11.3-27.el7.x86_64 (136/298) Is the file being overwritten at some point, then? I just checked the package payload with rpm2cpio, and it is in the included krb5.conf, as intended. (In reply to Nalin Dahyabhai from comment #13) > (In reply to Scott Poore from comment #12) > > No upgrade from what I can tell. Looks like was built with that version: > > > > [root@rhel7-5 log]# grep -i "INFO packaging: krb5-libs" > > /var/log/anaconda/anaconda.packaging.log > > 19:57:48,698 INFO packaging: krb5-libs-1.11.3-27.el7.x86_64 (136/298) > > Is the file being overwritten at some point, then? I just checked the > package payload with rpm2cpio, and it is in the included krb5.conf, as > intended. Oh yeah, it's overwritten by the ipa-server-install isn't it? From /usr/share/ipa/krb5.conf.template? [root@rhel7-1 ~]# grep default_ccache_name /usr/share/ipa/krb5.conf.template [root@rhel7-1 ~]# Should the IPA template be modified there? Yes, for distributions where KEYRING ccache type is available. Ok, I opened bug #1026861 for IPA krb5.conf.template file. For this, if I manually add back default_ccache_name to /etc/krb5.conf: ... [libdefaults] default_realm = IPA1.EXAMPLE.TEST dns_lookup_realm = false dns_lookup_kdc = true rdns = false ticket_lifetime = 24h forwardable = yes default_ccache_name = KEYRING:persistent:%{uid} ... [root@rhel7-1 ~]# kdestroy [root@rhel7-1 ~]# klist klist: No credentials cache found while retrieving principal name [root@rhel7-1 ~]# kinit admin Password for admin.TEST: [root@rhel7-1 ~]# klist Ticket cache: KEYRING:persistent:0:0 Default principal: admin.TEST Valid starting Expires Service principal 11/05/2013 09:04:22 11/06/2013 09:04:21 krbtgt/IPA1.EXAMPLE.TEST.TEST So, that's back to expected I think...now on to check out the cache dir /run/user/0 issue: [root@rhel7-1 ~]# env |grep XDG_RUNTIME_DIR XDG_RUNTIME_DIR=/run/user/0 [root@rhel7-1 ~]# cd /run/user/0 -bash: cd: /run/user/0: No such file or directory [root@rhel7-1 ~]# export KRB5CCNAME=DIR:/run/user/0/krb5cc [root@rhel7-1 ~]# kdestroy kdestroy: No credentials cache found while destroying cache [root@rhel7-1 ~]# klist klist: No credentials cache found (ticket cache DIR::/run/user/0/krb5cc/tkt) [root@rhel7-1 ~]# kinit admin Password for admin.TEST: [root@rhel7-1 ~]# cd /run/user/0/ [root@rhel7-1 0]# ls krb5cc [root@rhel7-1 0]# cd krb5cc/ [root@rhel7-1 krb5cc]# ls primary tkt So, I do think that looks better. Thanks, Scott This is all a workaround for the default location not being there all of the time, but we're not using that default any more. Given that we don't have privileges to do the same for other UIDs, is there a reason we should still be doing this? Actually, isn't the fix useful for other users if cache location set somewhere outside of run? [root@rhel7-1 root]# su - mytest Last login: Tue Nov 5 10:33:44 CST 2013 on pts/0 su: warning: cannot change directory to /home/mytest: No such file or directory -sh-4.2$ export KRB5CCNAME=DIR:/tmp/mytestkcc -sh-4.2$ kinit mytest Password for mytest.TEST: -sh-4.2$ klist Ticket cache: DIR::/tmp/mytestkcc/tkt Default principal: mytest.TEST Valid starting Expires Service principal 11/05/2013 10:34:16 11/06/2013 10:34:14 krbtgt/IPA1.EXAMPLE.TEST.TEST So, looks like it could be useful in some cases still. Or is it something else handling creating those dirs and the previous fix here just handled /run/user/0? I guess I'm just trying to determine what is expected here so we can accurately help verify the bug. Thanks, Scott This request was resolved in Red Hat Enterprise Linux 7.0. Contact your manager or support representative in case you have further questions about the request. |