As usual, any feedback is appreciated, so drop me a line: noveck@woblag.com. Once it gets past the spam filters, I'll try my best to respond asap.
1. Use PAM to disable the use of null passwords in user Accounts.
vi /etc/pam.d/system-auth
Find line
password sufficient pam_unix.so md5 shadow nullok try_first_pass use_authtok
Remove/delete nullok option, so the line now reads:
password sufficient pam_unix.so md5 shadow try_first_pass use_authtok
save and close file
vi /etc/pam.d/system-auth
find line
password sufficient pam_unix.so md5 shadow nullok try_first_pass use_authtok
Add to end of line
password sufficient pam_unix.so md5 shadow nullok try_first_pass use_authtok remember=3
save and close file
vi /etc/pam.d/system-auth
find line
password sufficient pam_unix.so md5 shadow nullok try_first_pass use_authtok
Add new line BEFORE
passwd password requisite pam_cracklib.so minlen=8
save and close file
vi /etc/pam.d/system-auth
Add the following line to end of file
auth required pam_tally.so onerr=fail deny=5 unlock_time=3600
save and close file
--END
Remove/delete nullok option, so the line now reads:
password sufficient pam_unix.so md5 shadow try_first_pass use_authtok
save and close file
2. Use PAM to prevent re-using/recycling passwords .
This example prevents the use of the last 3 passwords.vi /etc/pam.d/system-auth
find line
password sufficient pam_unix.so md5 shadow nullok try_first_pass use_authtok
Add to end of line
password sufficient pam_unix.so md5 shadow nullok try_first_pass use_authtok remember=3
save and close file
3. Set password minimum length
This example sets the minimum password length to 8 characters.vi /etc/pam.d/system-auth
find line
password sufficient pam_unix.so md5 shadow nullok try_first_pass use_authtok
Add new line BEFORE
passwd password requisite pam_cracklib.so minlen=8
save and close file
4. Configure server to deny access with multiple incorrect login attempts
This example temporarily denies access after 5 attempts. The temporary lockout time can also be configured for a certain time, which will be set to 1 hour (3600 seconds) in this example.vi /etc/pam.d/system-auth
Add the following line to end of file
auth required pam_tally.so onerr=fail deny=5 unlock_time=3600
save and close file
--END