Improper format of Kerberos configuration file
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
krb5 (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
kadmind refuses to start for me with ubuntu-server 7.10. Here is the error:
Improper format of Kerberos configuration file while initializing context, aborting
strace shows that it's opening up the right file:
stat64(
open("/
access(
fstat64(4, {st_mode=
mmap2(NULL, 4096, PROT_READ|
read(4, "[kdcdefaults]
close(4) = 0
munmap(0xb7f1c000, 4096) = 0
write(2, "kadmind: Improper format of Kerb"..., 93kadmind: Improper format of Kerberos configuration file while initializing context, aborting
) = 93
exit_group(1) = ?
Process 13773 detached
And here is my file, which is the default kdc.conf:
[kdcdefaults]
kdc_ports = 750,88
[realms]
= {
acl_file = /etc/krb5kdc/
kdc_ports = 750,88
max_life = 10h 0m 0s
}
This also happens on a fresh install of ubuntu-server, if and only if I just change the /etc/hostname file, and set the hostname via the hostname command, i.e.:
$ sudo hostname myserver.
$ sudo echo myserver.
I don't know what that has to do with anything, but I do know that if I do a fresh install of ubuntu-server 7.10, and just do the following:
$ sudo apt-get install krb5-admin-server
it works fine, but if I do
$ sudo hostname myserver.
$ sudo echo myserver.
$ sudo apt-get install krb5-admin-server
it fails. I did this in a VMWare virtual machine with a fresh install, with these commands being the only thing I ever ran on it, and it failed.
This is reproducible on multiple computers as well.
It is also worth noting that the following is output during the installation of krb5-config:
dnsdomainname: Unknown host
which I assume is the best indicator of what the problem actually is
Any help would be greatly appreciated! Thanks ahead of time.
-Matt
Changed in krb5: | |
status: | Confirmed → Fix Released |
Of course, it's not until exactly 2 minutes after I submit the bug report that I figure out the fix. I maintain that this is still a bug, because the installation should have failed, but at least I have a workaround now.
After noticing that dnsdomainname complained during the install, I decided to wager that it was the main contributing factor, so I started fiddling around and found that it was, indeed the problem. One just needs to make sure that dnsdomainname returns a proper result, and that is done by fiddling with either your dns or the /etc/hosts file... the latter is what I did. After dnsdomainname returned a proper result, I did
$ sudo aptitude purge krb5-admin-server
$ sudo apt-get install krb5-admin-server
and all was well. Perhaps there should be a fallback for when dnsdomainname doesn't return properly during installation? Either way, installation shouldn't fail that critically when there is something amiss with the dns, no?
-Matt