How can I enforce mínimum length and complexity for users passwords on Linux?

Thank you

link|improve this question
feedback

2 Answers

up vote 6 down vote accepted

You should look into all things "pam" and particularly the pam_passwdqc.so module which stands for Pluggable Authentication Modules". Man page here: http://linux.die.net/man/8/pam_passwdqc Article here: http://articles.techrepublic.com.com/5100-10878_11-6111316.html

This little perl one liner will do set password quality as per the NSA Securing Linux Guide:

perl -p -i.prekickstart -e 'BEGIN {print stderr "Configure password quality module\n";}  \
                s{(^password\s+requisite\s+)(pam_cracklib.so)(.*)}{$1 pam_passwdqc.so min=disabled,disabled,16,12,8} ;' /etc/pam.d/system-auth

(Tested on RedHat/Centos).

link|improve this answer
feedback

RedHat Kbase for password length and complexity

one more link i have use log back may be help stronger Password

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.