I am setting up a testbed environment where Linux (Ubuntu 10.04) clients will authenticate to a Windows Server 2008 R2 Domain Server.
I am following the official Ubuntu guide to set up a Kerberos client here: https://help.ubuntu.com/community/Samba/Kerberos, but I have encountered a problem when running the kinit
command to connect to the domain server.
The command I am running is: kinit [email protected]
. This command returns the following error:
Realm not local to KDC while getting initial credentials
. Unfortunately, I cannot find any one else via Google searches that have experienced this exact error, so I have no idea what it means.
The client is able to ping the server's hostname, so the DNS server is pointing to the domain server.
Below is my krb5.conf file:
[libdefaults]
default = DS.DOMAIN.COM
dns_lookup_realm = true
dns_lookup_kdc true
[realms]
DS.DOMAIN.COM = {
kdc = ds.domain.com:88
admin_server = ds.domain.com
default_domain = domain.com
}
[domain_realm]
.domain.com = DS.DOMAIN.COM
domain.com = DS.DOMAIN.COM
How can I correct these errors? I would greatly appreciate all help I can get!
Is your domain name
DS.DOMAIN.COM
or justDOMAIN.COM
?In your realms you need to have them match, so assuming that DS.DOMAIN.COM is your domain you need to change:
to
However, if you domain is really
DOMAIN.COM
you would need to change your krb5.conf to look like:And then you would
kinit
like so:kinit [email protected]
Peaking into the source code, it looks like that error is thrown when the negotiation process receives a referral to another domain and that domain is not 'local', or in your krb5.conf config.
What that could be, I couldn't tell you. That probably depends on your Active Directory environment, and whether or not there are multiple domains in the tree. You probably need more domain_realm aliases, but exactly what that is we can't tell from here.
I had the same message using the same krb5.conf as provided by Zypher:
(sorry it seems I can't get proper formatting :/ )
In my case, I needed to kinit to MYDOMAIN.LOCAL rather than MYDOMAIN.COM. Not sure if this is due to an authentication setting in AD in general or just for my AD domain. My domain has 2 DCs, one is W2k3 R2 and the other (the one specified as mydc.mydomain.com in krb5.conf) is W2k8 R2. But this is another possible cause for the "Realm not local to KDC while getting initial credentials" message
I had this very same and found the answer was so simple after fixing my config I still had this. Thanks to logicalfuzz at linuxqustions.org.
The capitals make all the difference here. I know this is shown in examples but I wanted to stress it.
I got this error while trying with connecting that machine from one domain to different domain. Editing /etc/krb5.conf also didn't work. Then I tried the following command to reconfigure stuffs for different domain
with desired options and settings which stopped giving the above error in kinit command. Resolved.
ill add this just because i just ended here for the same error but found another fix for yet another problem ... make sure that the domain is in ALL CAPS : [email protected] and not [email protected]... i just lost 2 hours of my life because of this one...
I know this is an old question, but I do want to add for future troubleshooters that my resolution to this issue was a combination of all of the suggested answers, as well as adding my primary domain controller to my
/etc/hosts
The configurations from this article worked for me.
Contents of rightly configured krb5.conf file with realm name, as an example:
keep a register