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 NFSAlternatively, you can start kpropd stand-alone from the command line with /usr/sbin/kpropd -S,in which case you will need to write an init script specifically for kpropd in order to start it at boot.Transfer the database from the master server:/usr/sbin/kdb5_util dump slave_transfer/usr/sbin/kprop -f slave_transfer server2.example.comRe-create the stash file (the file generated from the database password) on the slave server:kdb5_util -m stashEnter the password you used when creating the database on your master server.Start krb5-kdc on the slave server, and check the logs for errors. To confirm that it’s working, addthe slave entry, remove the master entry from /etc/krb5.conf on one of your clients, and check thatkdestroy; kinit works.TroubleshootingHere are some things to check if you get an error message:“Key table entry not found”:a. Check the logs. Is localhost being used instead of hostname?b. If so, edit /etc/hosts appropriately.“Key number mismatch”:a. Compare kvno host/server.example.com and klist -k /etc/krb5.keytab onboth servers.b. If they mismatch, you may need to destroy and re-create principals.c. In this instance, run kdestroy; kinit before trying again to clear cached keynumbers.“Cannot find KDC”:a. This may be a host resolve problem. Test this by replacing the name with theIP address in /etc/krb5.keytab.b. If this solves the problem, check /etc/hosts for the wrong localhost entries.The final step is to run kpropd regularly to propagate any changes in information from the master tothe slave. This is usually done with a two-line script (dump to file and propagate the file across), whichruns from /etc/crontab with the output directed to /dev/null.The downside to this is that while you don’t want to get the SUCCEEDED message e-mailed to youevery time it propagates successfully, you do want to know about it in the event of failure. This slightlyimproved script handles that:48Download at WoweBook.Com

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

Saved successfully!

Ooh no, something went wrong!