Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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

Thank you

share|improve this question
add comment

2 Answers 2

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).

share|improve this answer
add comment

RedHat Kbase for password length and complexity

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

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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