%general-entities; ]> $Date$ Heimdal-&heimdal-version; Heimdal Introduction to Heimdal Heimdal is a free implementation of Kerberos 5 that aims to be compatible with MIT Kerberos 5 and is backward compatible with Kerberos 4. Kerberos is a network authentication protocol. Basically it preserves the integrity of passwords in any untrusted network (like the Internet). Kerberized applications work hand-in-hand with sites that support Kerberos to ensure that passwords cannot be stolen or compromised. A Kerberos installation will make changes to the authentication mechanisms on your network and will overwrite several programs and daemons from the Shadow, Inetutils and Qpopper packages. See for a complete list of all the files and commands to rename each of them. &lfssvn_checked;20101029&lfssvn_checked2; Package Information Download (HTTP): Download (FTP): Download MD5 sum: &heimdal-md5sum; Download size: &heimdal-size; Estimated disk space required: &heimdal-buildsize; Estimated build time: &heimdal-time; Additional Downloads Required Patch: Heimdal Dependencies Required to Build the Server-Side Tools Recommended Optional , , , , and libcap-ng (with this patch if the Linux kernel version is >=2.6.36) Some sort of time synchronization facility on your system (like ) is required since Kerberos won't authenticate if the time differential between a kerberized client and the KDC server is more than 5 minutes. User Notes: Installation of Heimdal Ensure you really need a Kerberos installation before you decide to install this package. Failure to install and configure the package correctly can alter your system so that users cannot log in. Install Heimdal by running the following commands: patch -Np1 -i ../heimdal-&heimdal-version;-otp_fixes-1.patch && sed -i 's|/var/heimdal|/var/lib/heimdal|' \ `grep -lr "/var/heimdal" doc kadmin kdc lib` && ./configure --prefix=/usr \ --sysconfdir=/etc/heimdal \ --libexecdir=/usr/sbin \ --localstatedir=/var/lib/heimdal \ --datadir=/var/lib/heimdal \ --with-hdbdir=/var/lib/heimdal \ --with-readline=/usr \ --enable-kcm && make && install -v -m755 -d doc/html && make -C doc html && mv -v doc/heimdal.html doc/html/heimdal && mv -v doc/hx509.html doc/html/hx509 && makeinfo --html --no-split -o doc/heimdal.html doc/heimdal.texi && makeinfo --html --no-split -o doc/hx509.html doc/hx509.texi && makeinfo --plaintext -o doc/heimdal.txt doc/heimdal.texi && makeinfo --plaintext -o doc/hx509.txt doc/hx509.texi If you have installed and wish to create PDF and Postscript forms of the documentation, change into the doc directory and issue any or all of the following commands: pushd doc && texi2pdf heimdal.texi && texi2dvi heimdal.texi && dvips -o heimdal.ps heimdal.dvi && texi2pdf hx509.texi && texi2dvi hx509.texi && dvips -o hx509.ps hx509.dvi && popd To test the results, issue: make -k check. The check-iprop test is known to fail but all others should pass. Now, as the root user: make install && install -v -m755 -d /usr/share/doc/heimdal-&heimdal-version; && install -v -m644 doc/{heimdal,hx509}.{html,txt} \ doc/{init-creds,layman.asc} \ /usr/share/doc/heimdal-&heimdal-version; && cp -v -R doc/html \ destdir/usr/share/doc/heimdal-&heimdal-version; && mv -v /bin/login /bin/login.SHADOW && mv -v /bin/su /bin/su.SHADOW && mv -v /usr/bin/{login,su} /bin && ln -v -sf ../../bin/login /usr/bin && for LINK in \ lib{otp,kafs,krb5,hx509,sqlite3,asn1,roken,crypto,wind}; do mv -v /usr/lib/${LINK}.so.* /lib && ln -v -sf ../../lib/$(readlink /usr/lib/${LINK}.so) \ /usr/lib/${LINK}.so done && mv -v /usr/lib/$(readlink /usr/lib/libdb.so) \ /usr/lib/libdb-?.so \ /lib && ln -v -sf ../../lib/$(readlink /usr/lib/libdb.so) \ /usr/lib/libdb.so && ldconfig If you built any of the additional forms of documentation, install it using the following commands as the root user: install -v -m644 doc/{heimdal,hx509}.{dvi,ps,pdf} \ /usr/share/doc/heimdal-&heimdal-version; If you wish to use the library to enforce strong passwords in the KDC database, issue the following commands as the root user: sed -e 's|/usr/pkg|/usr|' \ -e 's|/usr/lib/cracklib_dict|/lib/cracklib/pw_dict|' \ -e 's|/var/heimdal|/var/lib/heimdal|' \ lib/kadm5/check-cracklib.pl \ > /bin/krb5-check-cracklib.pl && chmod -v 755 /bin/krb5-check-cracklib.pl Command Explanations sed -i ... `grep -lr "/var/heimdal" doc kadmin kdc lib`: This command is used to change the hard-coded references in the documentation files from /var/heimdal to the FHS compliant /var/lib/heimdal directory name. --libexecdir=/usr/sbin: This switch causes the daemon programs to be installed into /usr/sbin. If you want to preserve all your existing Inetutils package daemons, install the Heimdal daemons into /usr/sbin/heimdal (or wherever you want). Since these programs will be called from (x)inetd or rc scripts, it really doesn't matter where they are installed, as long as they are correctly specified in the /etc/(x)inetd.conf file and rc scripts. If you choose something other than /usr/sbin, you may want to move some of the user programs (such as kadmin) to /usr/sbin manually so they'll be in the privileged user's default PATH. --localstatedir=/var/lib/heimdal, --datadir=/var/lib/heimdal and --with-hdbdir=/var/lib/heimdal: These parameters are used so that the KDC database and associated files will all reside in /var/lib/heimdal. --with-readline=/usr: This parameter must be used so that the configure script properly locates the installed Readline package. --enable-kcm: This parameter enables building the Kerberos Credentials Manager. : This parameter must be used so that the configure script properly locates the installed Sqlite3 package. and : These parameters must be used so that the configure script properly locates the installed OpenLDAP package in order to build the module allowing an LDAP backend database. mv ... ...SHADOW, mv ... /bin and ln ... /usr/bin: The login and su programs installed by Heimdal belong in the /bin directory. The login program is symlinked because Heimdal is expecting to find it in /usr/bin. The old executables from the Shadow package are preserved before the move so that they can be restored if you experience problems logging into the system after the Heimdal package is installed and configured. for LINK in ...; do ...; done, mv ... /lib and ln ... /usr/lib/libdb.so: The login and su programs previously moved into the /lib directory link against Heimdal libraries as well as libraries provided by the OpenSSL and Berkeley DB packages. These libraries are also moved to /lib so they are FHS compliant and also in case /usr is located on a separate partition which may not always be mounted. Configuring Heimdal Config Files /etc/heimdal/* /etc/heimdal/* Configuration Information All the configuration steps shown below must be accomplished by the root user unless otherwise noted. Master KDC Server Configuration Many of the commands below use <replaceable> tags to identify places where you need to substitute information specific to your network. Ensure you replace everything in these tags (there will be no angle brackets when you are done) with your site-specific information. Create the Kerberos configuration file with the following commands: install -v -m755 -d /etc/heimdal && cat > /etc/heimdal/krb5.conf << "EOF" && # Begin /etc/heimdal/krb5.conf [libdefaults] default_realm = <EXAMPLE.COM> encrypt = true [realms] <EXAMPLE.COM> = { kdc = <hostname.example.com> admin_server = <hostname.example.com> kpasswd_server = <hostname.example.com> } [domain_realm] .<example.com> = <EXAMPLE.COM> [logging] kdc = FILE:/var/log/kdc.log admin_server = FILE:/var/log/kadmin.log default = FILE:/var/log/krb.log # End /etc/heimdal/krb5.conf EOF chmod -v 644 /etc/heimdal/krb5.conf You will need to substitute your domain and proper hostname for the occurrences of the <hostname> and <EXAMPLE.COM> names. should be the name of your domain changed to ALL CAPS. This isn't required, but both Heimdal and MIT Kerberos recommend it. provides encryption of all traffic between kerberized clients and servers. It's not necessary and can be left off. If you leave it off, you can encrypt all traffic from the client to the server using a switch on the client program instead. The parameters tell the client programs where to look for the KDC authentication services. The section maps a domain to a realm. Store the master password in a key file using the following commands: install -v -m755 -d /var/lib/heimdal && kstash Create the KDC database: kadmin -l The commands below will prompt you for information about the principles. Choose the defaults for now unless you know what you are doing and need to specify different values. You can go in later and change the defaults, should you feel the need. You may use the up and down arrow keys to use the history feature of kadmin in a similar manner as the bash history feature. At the kadmin> prompt, issue the following statement: init <EXAMPLE.COM> The database must now be populated with at least one principle (user). For now, just use your regular login name or root. You may create as few, or as many principles as you wish using the following statement: add <loginname> The KDC server and any machine running kerberized server daemons must have a host key installed: add --random-key host/<hostname.example.com> After choosing the defaults when prompted, you will have to export the data to a keytab file: ext host/<hostname.example.com> This should have created a file in /etc/heimdal named krb5.keytab. This file should have 600 (root rw only) permissions. Keeping the keytab file from public access is crucial to the overall security of the Kerberos installation. Eventually, you'll want to add server daemon principles to the database and extract them to the keytab file. You do this in the same way you created the host principles. Below is an example: add --random-key ftp/<hostname.example.com> (choose the defaults) ext ftp/<hostname.example.com> Exit the kadmin program (use quit or exit) and return back to the shell prompt. Start the KDC daemon manually, just to test out the installation: /usr/sbin/kdc & Attempt to get a TGT (ticket granting ticket) with the following command: kinit <loginname> You will be prompted for the password you created. After you get your ticket, you should list it with the following command: klist Information about the ticket should be displayed on the screen. To test the functionality of the keytab file, issue the following command: ktutil list This should dump a list of the host principals, along with the encryption methods used to access the principals. At this point, if everything has been successful so far, you can feel fairly confident in the installation, setup and configuration of your new Heimdal Kerberos 5 installation. If you wish to use the library to enforce strong passwords in the KDC database, you must do two things. First, add the following lines to the /etc/heimdal/krb5.conf configuration file: [password_quality] policies = builtin:external-check external_program = /bin/krb5-check-cracklib.pl Next you must install the Crypt::Cracklib Perl module. Download it from the CPAN site. The URL at the time of this writing is . After unpacking the tarball and changing into the newly created directory, issue the following command to add the BLFS Cracklib dictionary location to one of the source files: sed -i 's|pw_dict|&\n\t\t/lib/cracklib/pw_dict|' Cracklib.pm Then use the standard perl Makefile.PL; make; make test; make install commands. Install the /etc/rc.d/init.d/heimdal init script included in the package: heimdal make install-heimdal Using Kerberized Client Programs To use the kerberized client programs (telnet, ftp, rsh, rxterm, rxtelnet, rcp, xnlock), you first must get a TGT. Use the kinit program to get the ticket. After you've acquired the ticket, you can use the kerberized programs to connect to any kerberized server on the network. You will not be prompted for authentication until your ticket expires (default is one day), unless you specify a different user as a command line argument to the program. The kerberized programs will connect to non-kerberized daemons, warning you that authentication is not encrypted. In order to use the Heimdal X programs, you'll need to add a service port entry to the /etc/services file for the kxd server. There is no 'standardized port number' for the 'kx' service in the IANA database, so you'll have to pick an unused port number. Add an entry to the services file similar to the entry below (substitute your chosen port number for <49150>): kx <49150>/tcp # Heimdal kerberos X kx <49150>/udp # Heimdal kerberos X For additional information consult the Heimdal hint on which the above instructions are based. Contents Installed Programs Installed Libraries Installed Directories afslog, ftp, ftpd, gss, hprop, hpropd, hxtool, iprop-log, ipropd-master, ipropd-slave, kadmin, kadmind, kauth, kcm, kdc, kdestroy, kdigest, kf, kfd, kgetcred, kimpersonate, kinit, klist, kpasswd, kpasswdd, krb5-check-cracklib.pl, krb5-config, kstash, ktutil, kx, kxd, login, mk_cmds-krb5, otp, otpprint, pagsh, pfrom, popper, push, rcp, rsh, rshd, rxtelnet, rxterm, string2key, su, telnet, telnetd, tenletxr, verify_krb5_conf and xnlock hdb_ldap.{so,a}, libasn1.{so,a}, libgssapi.{so,a}, libhdb.{so,a}, libheimntlm.{so,a}, libhx509.{so,a}, libkadm5clnt.{so,a}, libkadm5srv.{so,a}, libkafs.{so,a}, libkdc.{so,a}, libkrb5.{so,a}, libotp.{so,a}, libroken.{so,a}, libsl.{so,a}, libss-krb5.{so,a} and wind.{so,a} /etc/heimdal, /usr/include/gssapi, /usr/include/kadm5, /usr/include/krb5, /usr/include/roken, /usr/share/doc/heimdal-&heimdal-version; and /var/lib/heimdal Short Descriptions afslog obtains AFS tokens for a number of cells. afslog ftp is a kerberized FTP client. ftp ftpd is a kerberized FTP daemon. ftpd hprop takes a principal database in a specified format and converts it into a stream of Heimdal database records. hprop hpropd is a server that receives a database sent by hprop and writes it as a local database. hpropd iprop-log is used to maintain the iprop log file. iprop-log ipropd-master is a daemon which runs on the master KDC server which incrementally propagates changes to the KDC database to the slave KDC servers. ipropd-master ipropd-slave is a daemon which runs on the slave KDC servers which incrementally propagates changes to the KDC database from the master KDC server. ipropd-slave kadmin is a utility used to make modifications to the Kerberos database. kadmin kadmind is a server for administrative access to the Kerberos database. kadmind kauth is a symbolic link to the kinit program. kauth kcm is a process based credential cache for Kerberos tickets. kcm kdc is a Kerberos 5 server. kdc kdestroy removes a principle's current set of tickets. kdestroy kf is a program which forwards tickets to a remote host through an authenticated and encrypted stream. kf kfd is a server used to receive forwarded tickets. kfd kgetcred obtains a ticket for a service. kgetcred kinit is used to authenticate to the Kerberos server as a principal and acquire a ticket granting ticket that can later be used to obtain tickets for other services. kinit klist reads and displays the current tickets in the credential cache. klist kpasswd is a program for changing Kerberos 5 passwords. kpasswd kpasswdd is a Kerberos 5 password changing server. kpasswdd krb5-config gives information on how to link programs against Heimdal libraries. krb5-config kstash stores the KDC master password in a file. kstash ktutil is a program for managing Kerberos keytabs. ktutil kx is a program which securely forwards X connections. kx kxd is the daemon for kx. kxd login is a kerberized login program. login otp manages one-time passwords. otp otpprint prints lists of one-time passwords. otpprint pfrom is a script that runs push --from. pfrom popper is a kerberized POP-3 server. popper push is a kerberized POP mail retrieval client. push rcp is a kerberized rcp client program. rcp rsh is a kerberized rsh client program. rsh rshd is a kerberized rsh server. rshd rxtelnet starts a secure xterm window with a telnet to a given host and forwards X connections. rxtelnet rxterm starts a secure remote xterm. rxterm string2key maps a password into a key. string2key su is a kerberized su client program. su telnet is a kerberized telnet client program. telnet telnetd is a kerberized telnet server. telnetd tenletxr forwards X connections backwards. tenletxr verify_krb5_conf checks krb5.conf file for obvious errors. verify_krb5_conf xnlock is a program that acts as a secure screen saver for workstations running X. xnlock libasn1.{so,a} provides the ASN.1 and DER functions to encode and decode the Kerberos TGTs. libasn1.{so,a} libgssapi.{so,a} contain the Generic Security Service Application Programming Interface (GSSAPI) functions which provides security services to callers in a generic fashion, supportable with a range of underlying mechanisms and technologies and hence allowing source-level portability of applications to different environments. libgssapi.{so,a} libhdb.{so,a} is a Heimdal Kerberos 5 authentication/authorization database access library. libhdb.{so,a} libkadm5clnt.{so,a} contains the administrative authentication and password checking functions required by Kerberos 5 client-side programs. libkadm5clnt.{so,a} libkadm5srv.{so,a} contain the administrative authentication and password checking functions required by Kerberos 5 servers. libkadm5srv.{so,a} libkafs.{so,a} contains the functions required to authenticated to AFS. libkafs.{so,a} libkrb5.{so,a} is an all-purpose Kerberos 5 library. libkrb5.{so,a} libotp.{so,a} contains the functions required to handle authenticating one time passwords. libotp.{so,a} libroken.{so,a} is a library containing Kerberos 5 compatibility functions. libroken.{so,a}