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 1113652 - trusted domain logins cannot find KDC for requested realm
Summary: trusted domain logins cannot find KDC for requested realm
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: krb5
Version: 6.6
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: rc
: ---
Assignee: Nalin Dahyabhai
QA Contact: Kaushik Banerjee
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-06-26 14:41 UTC by Jeremy Agee
Modified: 2018-12-09 18:04 UTC (History)
12 users (show)

Fixed In Version: krb5-1.10.3-26.el6
Doc Type: Bug Fix
Doc Text:
Cause: When using DNS to locate KDCs, it attempts to locate the KDCs for a given realm failed, the Kerberos client library would attempt to locate a master KDC for that realm. If that succeeded, it would subsequently only attempt to locate master KDCs. Consequence: When the client library needed to follow referrals from one realm to another to another, it would often fail at a subsequent step if a realm did not have master KDCs specifically named in DNS, even if it had named non-masters. Fix: The internal state which was not being reset was modified so that it would be reset if the name of the realm being located changed. Result: These failures should no longer occur.
Clone Of:
Environment:
Last Closed: 2014-10-14 08:10:54 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
debug logs for sssd (38.51 KB, application/x-bzip)
2014-06-26 14:41 UTC, Jeremy Agee
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2014:1389 0 normal SHIPPED_LIVE Moderate: krb5 security and bug fix update 2014-10-14 01:27:10 UTC

Description Jeremy Agee 2014-06-26 14:41:14 UTC
Created attachment 912445 [details]
debug logs for sssd

Using a rhel6.6 20140625.n.0 nightly build, the test system is joined to the root AD domain sssdad.com.  There are two other trusted domains a child domain child1.sssdad.com and a second tree domain sssdad_tree.com.  Logins are successful for users in the sssdad.com domain but fail for users in the other two domains.  NSS lookups of user data for all three domains works.

Version tested:
sssd-1.11.6-1.el6.x86_64

/etc/sssd/sssd.conf
[sssd]
config_file_version = 2
services = nss, pam
domains = sssdad.com

[nss]
debug_level = 0xFFF0

[pam]
debug_level = 0xFFF0

[domain/sssdad.com]
debug_level = 0xFFF0
id_provider = ad
access_provider = ad
ad_domain = sssdad.com
cache_credentials = True
use_fully_qualified_names = True
default_shell = /bin/bash
fallback_homedir = /home/%d/%u


/etc/krb5.conf was tested with realms and kdc's specified or set to resolve from dns.  The srv records _kerberos._tcp.<domainname> and _kerberos._udp.<domainname> resolve correctly to each of the three domain controllers.

/var/lib/sss/pubconf/krb5.include.d/domain_realm_sssdad_com 
[domain_realm]
.child1.sssdad.com = CHILD1.SSSDAD.COM
child1.sssdad.com = CHILD1.SSSDAD.COM
.sssdad_tree.com = SSSDAD_TREE.COM
sssdad_tree.com = SSSDAD_TREE.COM

Logs have three login attempts using the administrator user for each of the three domains. the sssdad.com administrator login succeeds and the other two administrator logins fail. The following logs are observed in the /var/log/sssd/krb5_child.log and /var/log/messages logs on a failure.

(Thu Jun 26 09:25:52 2014) [[sssd[krb5_child[22929]]]] [get_and_save_tgt] (0x0020): 981: [-1765328230][Cannot find KDC for requested realm]
(Thu Jun 26 09:25:52 2014) [[sssd[krb5_child[22929]]]] [map_krb5_error] (0x0020): 1043: [-1765328230][Cannot find KDC for requested realm]

Jun 26 09:25:52 dhcp129-34 [sssd[krb5_child[22929]]]: Cannot find KDC for requested realm

Comment 2 Jakub Hrozek 2014-06-26 15:04:09 UTC
Jeremy, do you know if the same test works on RHEL-7 ?

I wonder if this is a difference between sssd code or maybe libkrb settings.

Does your krb5.conf contain dns_lookup_kdc=true? Does it help to set it?

Comment 3 Jeremy Agee 2014-06-26 15:29:26 UTC
Yes jakub, im seeing rhel7 work as expected using the same config.

The earlier c#1 was using the krb5.conf with all realms and kdc's manually configured.

Switching to dns resolution in /etc/krb5.conf results in similar errors, but in this case its reporting the realm name in the logs where before it was more generic.

[logging]
 default = FILE:/var/log/krb5libs.log

[libdefaults]
 default_realm = SSSDAD.COM
 dns_lookup_kdc = true
 dns_lookup_realm = true
 ticket_lifetime = 24h
 renew_lifetime = 7d
 forwardable = true
 rdns = false
 
[realms]
 SSSDAD.COM = {
 }

[domain_realm] 
 sssdad.com = SSSDAD.COM
 .sssdad.com = SSSDAD.COM


(Thu Jun 26 11:09:01 2014) [[sssd[krb5_child[23311]]]] [get_and_save_tgt] (0x0020): 981: [-1765328164][Cannot resolve servers for KDC in realm "CHILD1.SSSDAD.COM"]
(Thu Jun 26 11:09:01 2014) [[sssd[krb5_child[23311]]]] [map_krb5_error] (0x0020): 1043: [-1765328164][Cannot resolve servers for KDC in realm "CHILD1.SSSDAD.COM"]

(Thu Jun 26 11:10:25 2014) [[sssd[krb5_child[23335]]]] [get_and_save_tgt] (0x0020): 981: [-1765328164][Cannot resolve servers for KDC in realm "SSSDAD_TREE.COM"]
(Thu Jun 26 11:10:25 2014) [[sssd[krb5_child[23335]]]] [map_krb5_error] (0x0020): 1043: [-1765328164][Cannot resolve servers for KDC in realm "SSSDAD_TREE.COM"]

Comment 12 Kaushik Banerjee 2014-07-30 08:31:38 UTC
Verified with krb5-libs-1.10.3-29.el6 . Almost all tests in the sssd ad forest suite now passes.

Comment 13 errata-xmlrpc 2014-10-14 08:10:54 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, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHSA-2014-1389.html


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