Linux Set the password complexity limit, how to set __linux

Source: Internet
Author: User
In Linux, there are several 1 ways to set the password complexity
. One is in the/etc/login.defs file, inside several options
pass_max_days  #密码最长过期天数
pass_min_ Days  #密码最小过期天数
pass_min_len  #密码最小长度
pass_warn_age   7   #密码过期警告天数

2. Another method is to modify the/etc/pam.d/system-auth file to
find password requisite pam_cracklib.so such a line replaced by the following:
password  Requisite pam_cracklib.so retry=5 difok=3 minlen=10 ucredit=-1 lcredit=-3 dcredit=-3 dictpath=/usr/share/  Cracklib/pw_dict

parameter meaning:
5    
least different characters: 3       
Minimum password length: min          
 Capital Letter: 1       
Minimum lowercase letters: 3        
min: 3        
Password Dictionary:/usr/share/cracklib/pw_dict

This setting, you can do a test, but you need to exit root, because the root user is not subject to these restrictions, it can set any password.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.