Tuesday, February 17, 2015

Temporarily disabling password complexity on hardened CentOS 6.5

Navigate to etc/pam.d
(system-auth is symbolic link to system-auth-ac)

Rename original file:
"mv system-auth-ac system-auth-ac-backup"

Create a new file
"cp system-auth-ac-backup system-auth-ac"

Edit "system-auth-ac"
Look for line that starts with "password required pam_cracklib.so"
Change parameters "minlen=1", "dcredit=0", "ucredit=0", "ocredit=0", "lcredit=0"
Save the file (No reboot is required)
Change password with "passwd"

Revert original file:
"cp system-auth-ac-backup system-auth-ac"

Remove bash history
make sure you're in your "profile" directory
"rm .bash_history" - you will be prompted if you want to delete the file.