13.07.2015 Views

Linux System Administration Recipes A Problem-Solution Approach

Linux System Administration Recipes A Problem-Solution Approach

Linux System Administration Recipes A Problem-Solution Approach

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

CHAPTER 2 ■ CENTRALIZING YOUR NETWORK: KERBEROS, LDAP, AND NFSThe -nodes switch is important in order to create an unencrypted certificate sothat it will work with LDAP. Again, when asked for the CN, it needs to be theFQDN of your server. This time it will be the LDAP server (here ldapserver.example.com).If you’re using an external CA, leave out the -x509 option.3. Sign the certificate:cd /etc/ssl/usr/lib/ssl/misc/CA.sh –signcertAgain, do not use a challenge password. The new certificate will be in newcert.pem. (Note: this script looks for the file newreq.pem and signs that; if you haveused another file in the certificate creation, you will need to rename or copy it.)Remember where these files are—you’ll need to move them into the LDAP directory in the nextrecipe.2-3b. LDAP ServerFor Debian/Ubuntu, run this:sudo apt-get install libldap2 slapd ldap-utils libdb3-dev libdb3slapd is the LDAP server; libdb3-dev and libdb3 provide the BerkeleyDB database back end. Youcan use other databases, but BerkeleyDB is straightforward to deal with and is strongly recommended bythe OpenLDAP team. Set the admin password when asked during dpkg-configure.To use SSL (as per the certificate generated earlier), you need to put the certificates generated earlierin the correct places:mv /etc/ssl/newcert.pem /etc/ldap/servercrt.pemmv /etc/ssl/newreq.pem /etc/ldap/serverkey.pemmv /etc/ssl/demoCA/cacert.pem /etc/ldap/cacert.pemchmod go-r /etc/ldap/serverkey.pemchown openldap /etc/ldap/serverkey.pemchmod a+r /etc/ldap/servercrt.pemEdit /etc/default/slapd to include these lines (this provides LDAP both using TLS over port 389 andusing LDAPS on port 636):SLAPD_SERVICES="ldap:/// ldaps:///"SLAPD_OPTIONS="4"As discussed at the start of this chapter, using LDAP with Kerberos provides more secure passwordmanagement. To use LDAP with Kerberos, you need to get a copy of krb5-kdc.schema (available fromhttp://www.stanford.edu/services/directory/openldap/configuration/krb5-kdc.schema or from the/usr/share/doc/krb5-kdc-ldap/kerberos.schema.gz file included in the krb5-kdc-ldap package). Thenput it in the /etc/ldap/schema/ directory.30Download at WoweBook.Com

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!