Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 115443 - app-crypt/mit-krb5 - /etc/kdc.conf not read
Summary: app-crypt/mit-krb5 - /etc/kdc.conf not read
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Server (show other bugs)
Hardware: x86 Linux
: High major (vote)
Assignee: Gentoo Kerberos Maintainers
URL:
Whiteboard:
Keywords:
: 167815 189420 (view as bug list)
Depends on:
Blocks:
 
Reported: 2005-12-13 11:42 UTC by Trev Peterson
Modified: 2007-08-19 21:17 UTC (History)
5 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Diff of fixed /etc/init.d/mit-krb5kdc with original (diff_mit-krb5kdc_mit-krb5kdc.new,39 bytes, patch)
2005-12-13 11:45 UTC, Trev Peterson
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Trev Peterson 2005-12-13 11:42:00 UTC
The current kdc.conf (/etc/kdc.conf) is ignored.  The default location for
kdc.conf is /usr/local/var/krb5kdc/kdc.conf
This can be set to a different location by setting the env variable
KRB5_KDC_PROFILE however this is not done in the init script



Reproducible: Always
Steps to Reproduce:
1.Change values in /etc/kdc.conf
2./etc/init.d/mit-krb5kdc restart
3.

Actual Results:  
config changes are not realized

Expected Results:  
config changes are realized

I classify this as major because this will cause the KDC to not function
properly.  The solution is to simply set the env variable to point to
/etc/kdc.conf.  I will attach the solution once the bug is filed.
Comment 1 Trev Peterson 2005-12-13 11:45:51 UTC
Created attachment 74656 [details, diff]
Diff of fixed /etc/init.d/mit-krb5kdc with original

This is the output of:
diff mit-krb5kdc mit-krb5kdc.new

/etc/init.d/mit-krb5kdc.new is the fixed version.
Comment 2 Axel Dyks 2006-01-27 03:12:31 UTC
Obviously threre is generally some confusion about
the correct locations of the configuration files.

As long as "/etc/krb5.conf" is found, which points
by itself to the "kdc.conf" of the current profile
(/etc/krb5kdc/kdc.conf) almost everything seems
to be OK... beside of duplicate entries in the
log files of "kadmind" and "krb5kdc"
(... and a long delay when kadmind is launched
during system startup that is obviously due to
"missing (u)random data").

Following the thread at
  http://mailman.mit.edu/pipermail/krb5-bugs/2005-December/004140.html
that suggests to set the environment variable KRB5_CONFIG
fixed this problem (duplicate entries) for me.

So I don't think that KRB5_KDC_PROFILE should be set.
Instead both "mit-krb5kadmind" and "mit-krb5kdc" in
"/etc/init.d" should set KRB5_CONFIG to "/etc/krb5.conf"
-- which would be found anyway, but prevents the duplicate
log enties -- and /etc/kdc.conf should not be pre-installed
at all.

ByTheway: I'm using
  * app-crypt/mit-krb5-1.4.1-r2 +berkdb -doc -ipv6 -krb4 -static -tcltk -tetex
  * dev-libs/openssl-0.9.7e-r2 -bindist -emacs -test +zlib

Cheers,
Axel

  


   
Comment 3 Axel Dyks 2006-01-30 10:33:08 UTC
Addition:
  In fact a sample "kdc.conf" can or should be installed,
  but not into "/etc" but into "/etc/krb5kdc/", because
  the sample "krb5.conf" points to a "kdc.conf" that is
  stored there and not in "/etc".

  Personally I would prefer the sample files to be named
  "/etc/krb5.conf.sample" and "/etc/krb5kdc/kdc.conf.sample",
  because it is very unlikely that someone really expects
  the gentoo "mit-krb5" package to serve the EXAMPLE.COM
  realm "out-of-the-box".

Axel
Comment 4 Seemant Kulleen (RETIRED) gentoo-dev 2006-05-22 06:46:27 UTC
Axel, that's a good point.  We should probably do that for heimdal as well.
Comment 5 Seemant Kulleen (RETIRED) gentoo-dev 2006-05-22 07:50:31 UTC
mit-krb5-1.4.3-r1 has this fixed

I'm going to be fast-tracking it to stable, because of the compile fixes as well.

heimdal-0.7.2 and 0.7.2-r1 got this fix as well.
Comment 6 Jakub Moc (RETIRED) gentoo-dev 2007-02-21 01:42:04 UTC
*** Bug 167815 has been marked as a duplicate of this bug. ***
Comment 7 Jakub Moc (RETIRED) gentoo-dev 2007-02-21 01:48:01 UTC
Eh...

1/ This has never been properly fixed; this bug as I understand it is not about installing stuff as *.conf.example but about the file being ignored in /etc (see Bug 167815).

2/ drizzt truncated the ChangeLog in a horrible way (the first entry is Jan 10 200 ?!7), plz. fix it.

http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-crypt/mit-krb5/ChangeLog?hideattic=0&r1=1.137&r2=1.138
Comment 8 Seemant Kulleen (RETIRED) gentoo-dev 2007-04-03 20:30:01 UTC
closing, as no more problems were reported with this.  if there are issues, please reopen and explain :)
Comment 9 Dawid Węgliński (RETIRED) gentoo-dev 2007-08-19 02:30:50 UTC
*** Bug 189420 has been marked as a duplicate of this bug. ***
Comment 10 Jacob Welsh 2007-08-19 03:43:18 UTC
This is not fixed -- /etc/kdc.conf is not read by any of the kdc utilities. /var/lib/krb5kdc/kdc.conf is, but this location is not documented, nor is it ideal.

How is it that krb5.conf can "point to" kdc.conf? There is no such option in the example or the man page...

Apparently I'm not allowed to reopen the bug.
Comment 11 Helkyn (Jean-Yves Migeon) 2007-08-19 12:51:01 UTC
Yep, you are right, I just checked and the 1.5.3 version still has this "bug". Dunno if we should call it a bug though.

In essence, yes, it could become annoying, as many distros and BSDs use some kind of directory in /etc to configure the KDC (usually, /etc/krb5kdc in debian or /etc/KerberosV for netbsd). Provided man pages are not totally clear on that matter too.

You just have to know that it resides in /var/lib/kerberos, but some other ebuilds do have this behaviour (like pgsql). IMHO, creating some default kdc.conf and putting it in the right directory would be sufficient to point users to the default config path chosen for Kerberos.

Just my 2 cents.
Comment 12 Jacob Welsh 2007-08-19 17:07:51 UTC
Since the ebuild does not create the /var/lib/krb5kdc directory, but does create /etc/kdc.conf.example, the only logical assumption for a user is that /etc/kdc.conf is always read and they can set up the kdc wherever they like (such as /var/krb5kdc). This causes a lot of frustration, especially when one is used to debian's /etc/krb5kdc/kdc.conf.

For me it would be acceptable if kdc.conf.example were simply placed in the correct location (/var/lib/krb5kdc), though I would prefer it to be in /etc. "You just have to know" is not an acceptable strategy for creating happy users ;)
Comment 13 Helkyn (Jean-Yves Migeon) 2007-08-19 21:17:11 UTC
I see your point.

As seen in the mit-krb5 ebuild for 1.5.3, the kdc.conf example is installed in /etc (just checked the ebuild), and elog points to the docs found in /usr/share/doc/mit-krb5-1.5.3/html/krb5-admin/kdc.conf.html.

However, it states that the kdc.conf file is found in in /usr/local/var/krb5kdc, which is the localstatedir path by default. But ebuild installs the default config file in /etc/kdc.conf.example, and finding the correct location needs some thinking.

I am CCing kerberos@gentoo.org, since drizzt seems to be on holidays on his dev status.

There are many ways to fix this (from source patching to ebuild); I can provide a patch if necessary, but it is all up to what suits best to the MIT krb maintainers. Seemant?