%general-entities; ]> $LastChangedBy$ $Date$ MIT Kerberos V5-&mitkrb-version; MIT Kerberos V5 Introduction to MIT Kerberos V5 MIT Kerberos V5 is a free implementation of Kerberos 5. Kerberos is a network authentication protocol. It centralizes the authentication database and uses kerberized applications to work with servers or services that support Kerberos allowing single logins and encrypted communication over internal networks or the Internet. &lfs74_checked; Package Information Download (HTTP): Download (FTP): Download MD5 sum: &mitkrb-md5sum; Download size: &mitkrb-size; Estimated disk space required: &mitkrb-buildsize; Estimated build time: &mitkrb-time; MIT Kerberos V5 Dependencies Optional (for full test coverage), (to authenticate the package), , , (used during the testsuite) and (used during the testsuite) Some sort of time synchronization facility on your system (like ) is required since Kerberos won't authenticate if there is a time difference between a kerberized client and the KDC server. User Notes: Installation of MIT Kerberos V5 MIT Kerberos V5 is distributed in a TAR file containing a compressed TAR package and a detached PGP ASC file. You'll need to unpack the distribution tar file, then unpack the compressed tar file before starting the build. After unpacking the distribution tarball and if you have installed, you can authenticate the package. First, check the contents of the file krb5-&mitkrb-version;.tar.gz.asc. gpg --verify krb5-&mitkrb-version;.tar.gz.asc krb5-&mitkrb-version;.tar.gz You will probably see output similar to: gpg: Signature made Wed Aug 8 22:29:58 2012 GMT using RSA key ID F376813D gpg: Can't check signature: public key not found You can import the public key with: gpg --keyserver pgp.mit.edu --recv-keys 0xF376813D Now re-verify the package with the first command above. You should get a indication of a good signature, but the key will still not be certified with a trusted signature. Trusting the downloaded key is a separate operation but it is up to you to determine the level of trust. Build MIT Kerberos V5 by running the following commands: cd src && sed -e "s@python2.5/Python.h@& python2.7/Python.h@g" \ -e "s@-lpython2.5]@&,\n AC_CHECK_LIB(python2.7,main,[PYTHON_LIB=-lpython2.7])@g" \ -i configure.in && sed -e "s@interp->result@Tcl_GetStringResult(interp)@g" \ -i kadmin/testing/util/tcl_kadm5.c && sed -e 's@\^u}@^u cols 300}@' \ -i tests/dejagnu/config/default.exp && sed -e '/run\.test/d' \ -i plugins/kdb/db2/libdb2/test/Makefile.in && autoconf && ./configure --prefix=/usr \ --sysconfdir=/etc \ --localstatedir=/var/lib \ --with-system-et \ --with-system-ss \ --enable-dns-for-realm && make To test the build, issue: make check. You need at least , which is used to drive the testsuite. Furthermore, must be available for some of the tests to run. If you have a former version of MIT Kerberos V5 installed, it may happen that the test suite pick up the installed versions of the libraries, rather than the newly built ones. If so, it is better to run the tests after the installation. Now, as the root user: make install && for LIBRARY in gssapi_krb5 gssrpc k5crypto kadm5clnt kadm5srv \ kdb5 kdb_ldap krad krb5 krb5support verto ; do [ -e /usr/lib/lib$LIBRARY.so ] && chmod -v 755 /usr/lib/lib$LIBRARY.so done && mv -v /usr/lib/libkrb5.so.3* /lib && mv -v /usr/lib/libk5crypto.so.3* /lib && mv -v /usr/lib/libkrb5support.so.0* /lib && ln -v -sf ../../lib/libkrb5.so.3.3 /usr/lib/libkrb5.so && ln -v -sf ../../lib/libk5crypto.so.3.1 /usr/lib/libk5crypto.so && ln -v -sf ../../lib/libkrb5support.so.0.1 /usr/lib/libkrb5support.so && mv -v /usr/bin/ksu /bin && chmod -v 755 /bin/ksu && install -v -dm755 /usr/share/doc/krb5-&mitkrb-version; && cp -vfr ../doc/* /usr/share/doc/krb5-&mitkrb-version; && unset LIBRARY Command Explanations sed -e ...: The first sed fixes Python detection. The second one fixes building with Tcl 8.6. The third one increases the width of the virtual terminal used for some tests, to prevent some spurious characters to be echoed, which is taken as a failure. The last one disables one test, which may hang under certain circumstances. --localstatedir=/var/lib: This parameter is used so that the Kerberos variable run-time data is located in /var/lib instead of /usr/var. --with-system-et: This switch causes the build to use the system-installed versions of the error-table support software. --with-system-ss: This switch causes the build to use the system-installed versions of the subsystem command-line interface software. --enable-dns-for-realm: This switch allows realms to be resolved using the DNS server. mv -v /usr/bin/ksu /bin: Moves the ksu program to the /bin directory so that it is available when the /usr filesystem is not mounted. : Use this switch if you want to compile OpenLDAP database backend module. Configuring MIT Kerberos V5 Config Files /etc/krb5.conf and /var/lib/krb5kdc/kdc.conf /etc/krb5.conf /var/lib/krb5kdc/kdc.conf Configuration Information Kerberos Configuration You should consider installing some sort of password checking dictionary so that you can configure the installation to only accept strong passwords. A suitable dictionary to use is shown in the instructions. Note that only one file can be used, but you can concatenate many files into one. The configuration file shown below assumes you have installed a dictionary to /usr/share/dict/words. Create the Kerberos configuration file with the following commands issued by the root user: cat > /etc/krb5.conf << "EOF" # Begin /etc/krb5.conf [libdefaults] default_realm = <LFS.ORG> encrypt = true [realms] <LFS.ORG> = { kdc = <belgarath.lfs.org> admin_server = <belgarath.lfs.org> dict_file = /usr/share/dict/words } [domain_realm] .<lfs.org> = <LFS.ORG> [logging] kdc = SYSLOG[:INFO[:AUTH]] admin_server = SYSLOG[INFO[:AUTH]] default = SYSLOG[[:SYS]] # End /etc/krb5.conf EOF You will need to substitute your domain and proper hostname for the occurrences of the <belgarath> and <lfs.org> names. should be the name of your domain changed to ALL CAPS. This isn't required, but both Heimdal and MIT 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. Create the KDC database: kdb5_util create -r <LFS.ORG> -s Now you should populate the database with principals (users). For now, just use your regular login name or root. kadmin.local kadmin.local: add_policy dict-only kadmin.local: addprinc -policy dict-only <loginname> The KDC server and any machine running kerberized server daemons must have a host key installed: kadmin.local: addprinc -randkey host/<belgarath.lfs.org> After choosing the defaults when prompted, you will have to export the data to a keytab file: kadmin.local: ktadd host/<belgarath.lfs.org> This should have created a file in /etc named krb5.keytab (Kerberos 5). This file should have 600 (root rw only) permissions. Keeping the keytab files from public access is crucial to the overall security of the Kerberos installation. 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/krb5kdc Attempt to get a ticket with the following command: kinit <loginname> You will be prompted for the password you created. After you get your ticket, you can 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 ktutil: rkt /etc/krb5.keytab ktutil: l This should dump a list of the host principal, along with the encryption methods used to access the principal. At this point, if everything has been successful so far, you can feel fairly confident in the installation and configuration of the package. Additional Information For additional information consult the documentation for krb5-&mitkrb-version; on which the above instructions are based. Init Script If you want to start Kerberos services at boot, install the /etc/rc.d/init.d/krb5 init script included in the package using the following command: krb5 make install-krb5 Contents Installed Programs Installed Libraries Installed Directories gss-client, gss-server, k5srvutil, kadmin, kadmin.local, kadmind, kdb5_ldap_util (optional), kdb5_util, kdestroy, kinit, klist, kpasswd, kprop, kpropd, kproplog, krb5-config, krb5kdc, krb5-send-pr, ksu, kswitch, ktutil, kvno, sclient, sim_client, sim_server, sserver, uuclient and uuserver libgssapi_krb5.so, libgssrpc.so, libk5crypto.so, libkadm5clnt.so, libkadm5srv.so, libkdb5.so, libkdb_ldap.so (optional), libkrad.so, libkrb5.so, libkrb5support.so, and libverto.so /usr/include/gssapi, /usr/include/gssrpc, /usr/include/kadm5, /usr/include/krb5, /usr/lib/krb5, /usr/share/doc/krb5-&mitkrb-version;, /usr/share/examples/krb5 and /var/lib/krb5kdc Short Descriptions k5srvutil is a host keytable manipulation utility. k5srvutil kadmin is an utility used to make modifications to the Kerberos database. kadmin kadmind is a server for administrative access to a Kerberos database. kadmind kdb5_util is the KDC database utility. kdb5_util kdestroy removes the current set of tickets. kdestroy 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 kprop takes a principal database in a specified format and converts it into a stream of database records. kprop kpropd receives a database sent by kprop and writes it as a local database. kpropd krb5-config gives information on how to link programs against libraries. krb5-config krb5kdc is the Kerberos 5 server. krb5kdc ksu is the super user program using Kerberos protocol. Requires a properly configured /etc/shells and ~/.k5login containing principals authorized to become super users. ksu kswitch makes the specified credential cache the primary cache for the collection, if a cache collection is available. kswitch ktutil is a program for managing Kerberos keytabs. ktutil kvno prints keyversion numbers of Kerberos principals. kvno sclient used to contact a sample server and authenticate to it using Kerberos 5 tickets, then display the server's response. sclient sserver is the sample Kerberos 5 server. sserver libgssapi_krb5.so 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_krb5.so libkadm5clnt.so contains the administrative authentication and password checking functions required by Kerberos 5 client-side programs. libkadm5clnt.so libkadm5srv.so contain the administrative authentication and password checking functions required by Kerberos 5 servers. libkadm5srv.so libkdb5.so is a Kerberos 5 authentication/authorization database access library. libkdb5.so libkrad.so contains the internal support library for RADIUS functionality. libkrad.so libkrb5.so is an all-purpose Kerberos 5 library. libkrb5.so