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 NFScd /etc/ldap/schema/wget http://www.stanford.edu/services/directory/openldap/configuration/krb5-kdc.schemaEdit /etc/ldap/slapd.conf. This is a long file, so I’ve included just the changes or additions youneed to make here:includeinclude/etc/ldap/schema/krb5-kdc.schema/etc/ldap/schema/openldap.schema# ... other things that can stay as provided by default...TLSCACertificateFileTLSCertificateFileTLSCertificateKeyFile/etc/ldap/cacert.pem/etc/ldap/servercrt.pem/etc/ldap/serverkey.pem# ... other things that can stay as provided by default...# this section rewrites principals as needed for Kerberos authenticationauthz-policy fromauthz-regexpuid=(.*),cn=example.com,cn=GSSAPI,cn=authuid=$1,ou=people,dc=example,dc=comsasl-realm EXAMPLE.COMsasl-host ldapserver.example.com# ... rest of file ...The authz section is important for setting up LDAP with Kerberos. The authz-policy line allows auser to authorize as someone else, if this is permitted in the second user’s LDAP entry. The authz-regexpline takes a Kerberos authorization request and translates it into an LDAP user identifier. $1 in thesecond line refers to the (.*) in the first line, which corresponds to the whole of the uid field in theKerberos auth.So, the Kerberos authorization for user jkemp would be as follows:uid=jkemp,cn=example.com,cn=GSSAPI,cn=authand would be converted to this:uid=jkemp,ou=people,dc=example,dc=comThe SASL information is used to complete the LDAP lookup information when using SASL.The next step is to edit your permissions, which are also set in /etc/ldap/slapd.conf. Either findand edit as appropriate the existing access lines in your config (Debian/Ubuntu includes some basicsetup) or add these lines in the main Specific Directives for Database section of the config file. Theexample here is a basic functional setup, in which the LDAP admin user has full write access andeveryone has full read access; you can complicate it as much as you want, but be warned that it can getquite confusing!31Download at WoweBook.Com

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

Saved successfully!

Ooh no, something went wrong!