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

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

CHAPTER 2 ■ CENTRALIZING YOUR NETWORK: KERBEROS, LDAP, AND NFSThis modify_file would changes the user’s login shell to bash:dn: uid=jkemp,ou=People,dc=example,dc=comchangetype: modifyreplace: loginShellloginShell: /bin/bashThe changetype is specified as modify, and the field to replace is given before the replacement valueis given on the last line.This file would add an emailAddress field to the specified user, with the value given in the last line:dn: uid=jkemp,ou=People,dc=example,dc=comchangetype: addadd: emailAddressemailAddress: user@example.comNote the different changetype. You’re adding a field rather than modifying it, but again you specifythe field to add and then the value to add in much the same way as the replacement was specified in theprevious file.ldapdeleteFinally, use ldapdelete to delete an existing entry. All you need to specify for this is the DN of the entryyou want to delete:ldapdelete "cn=isis,ou=Hosts,dc=example,dc=com"You can also use ldapdelete -f file, where file contains a list of DNs in the same format, one perline, all of which will be deleted in turn.2-8. Setting Up a Slave LDAP ServerYou can run with just a single LDAP server, but it’s a far better idea to have at least two. That way, first,you can spread the request load if need be, and second, you have a backup so that if something goeswrong with your master server, users can still access the LDAP database (and thus log on and work!)while you’re fixing the problem.You can set up a slave LDAP server fairly easily. The slave server will handle any requests forinformation but will automatically pass any change requests to the master server. This means that thedatabase has to be replicated in only one direction and avoids the possibility of conflicting changesbeing made on different servers.For authentication, we’ll use rep_adm as the replication admin user (which will need to operateautomatically) and ldapadm as the regular interactive admin user (which therefore authenticates with apassword).■ Note This used to be handled by slurpd, but this has been deprecated now in favor of syncrepl.42Download at WoweBook.Com

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

Saved successfully!

Ooh no, something went wrong!