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 6 ■ SECURING YOUR SYSTEMS■ Note In some versions of Debian/Ubuntu, the /etc/hosts file contains the following line:127.0.0.1 localhost localhost.localdomainThis breaks SSH Kerberos. Instead, edit it to read as follows:127.0.0.1 localhostNow (still on the server side), start up kadmin with /usr/bin/kadmin -p krbadm (replace krbadm withyour Kerberos admin user if it’s different), and enter these commands:ank -randkey host/servername.example.com@EXAMPLE.COMktadd -k /etc/krb5.keytab host/servername.example.com@EXAMPLE.COMreplacing servername.example.com and EXAMPLE.COM with the fully qualified domain name of your serverand with your Kerberos domain, respectively.Restart sshd with /etc/init.d/ssh restart.You’ll also need to edit /etc/ssh/ssh_config on the client to contain this line:GSSAPIAuthentication yesNow check that you have a current Kerberos ticket on the client machine with klist, and then ssh tothe server with ssh servername. You should log in without being challenged for your password. Log outagain, delete your ticket with kdelete, and try again. This time you’ll be asked for your password as youwould usually expect.■ Note Bear in mind that Kerberos tickets do expire; if your setup obtains a ticket when you log in via GDM andyou customarily leave yourself logged in overnight, then the next morning you’ll need to log in to Kerberos againusing kinit before you can log into other machines without a password as described here. It’s possible to extendthe default life span of a Kerberos ticket, but this is unwise because it has obvious security implications.6-8. Setting and Enforcing a Password Policy with KerberosThere are two main issues with a password policy: creating it and enforcing it. When setting up apassword policy, it’s important to bear in mind that forcing people to change their passwords too oftencan be counterproductive. If your users have problems remembering stacks of new passwords, they’llresort to writing them down instead.144Download at WoweBook.Com

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

Saved successfully!

Ooh no, something went wrong!