Hi,
this is a small howto out of my needs, suggestions are always welcome!
- Assumptions for this paper
- You know and basically follow http://www.grolmsnet.de/kerbtut, but there are some facts missing/wrong.
- 2003R2 KDC’s are 10.0.0.1 and 10.0.0.2 (DNS: dc1.example.com and dc2.example.com)
- Kerberos Realm for ADS is ADS.EXAMPLE.COM (upper case required!)
- Web server (hostname.domain) is webhostname.server.example.com
- DNS and reverse DNS on and for the machine in FQDN works, verified with “dig” and “dig -x”
- Used packages on the web server
- rpm
- krb5
- krb5-apps-clients
- krb5-client
- krb5-devel
- apache2
- apache2-prefork
- apache2-devel
- libapr1
- libapr1-devel
- libapr-util1
- libapr-util1-devel
- libtool
- libltdl
- tarball
- mod_auth_kerb-5.3.tar.gz from http://modauthkerb.sourceforge.com
- rpm
- Doing “web server”
- Install all rpm’s as root with “yast2 sw_single”.
- Before continuing, repeat the YaST online update as often as it finds new updates
- Create the Kerberos principal inside AD
- Let your AD admin create a user with name “httpd_webhostname” and basic rights, e.g. for browsing the domain and let him specify a password for the user.
Pitfall: AD 2003 seems to be buggy, per definition this step should be enough. But since the user creation routine seems to be internally different from the user password change routine, at user creation time there is no Kerberos key created for the user. So: - Let the AD admin change the created user’s password
- This command has to be executed on the Domain Controller of the ADS with domain admin rights (the ktpass.exe is described under http://www.microsoft.com/technet/)
ktpass -princ HTTP/webhostname.server.example.com@ADS.EXAMPLE.COM -mapuser httpd_webhostname -crypto DES-CBC-MD5 -ptype KRB5_NT_PRINCIPAL -mapop set +DESONLY -pass ThIsIsMyPaSsWoRd -out C:\apache001.ktab
- Copy or move the C:\apache.ktab to /etc/apache2/apache.ktab on the web server and change it’s owner to wwwrun (or any other use Apache 2 will run as) and the mode to 600 (rw for owner)
- The Kerberos client setup
- Make your /etc/krb5.conf look like
[libdefaults] default_realm = ADS.EXAMPLE.COM [realms] ADS.EXAMPLE.COM = { kdc = dc1.ads.example.com:88 kdc = dc2.ads.example.com:88 } [logging] kdc = /var/log/krb5/krb5kdc.log admin_server = /var/log/krb5/kadmind.log default = SYSLOG:NOTICE:DAEMON [domain_realm] .ads.example.com = ADS.EXAMPLE.COM ads.example.com = ADS.EXAPMLE.COM
It’s just a short overview, take it as my Best Practise.
Usn