Set Linux Password Policy

Source: Internet
Author: User

/Etc/login. defs
PASS_MAX_DAYS 99999 # Maximum Password validity period, 99999: Permanent
PASS_MIN_DAYS 0 # indicates whether the password can be changed. If the password is set to 0, the password can be changed. If the password is set to not 0, the password can be changed.
PASS_MIN_LEN 5 # minimum password length. This parameter is no longer valid when pam_cracklib module is used.
PASS_WARN_AGE 7 # How many days before the password expires when the user logs on to notify the user to change the password
/Etc/pam. d/system-auth
Password requisite/lib/security/$ ISA/pam_cracklib.so retry = 3
Password sufficient/lib/security/$ ISA/pam_unix.so nullok use_authtok md5 shadow use_first_pass
Password required/lib/security/$ ISA/pam_deny.so
Change
Password required pam_passwdqc.so min = disabled, disabled, 12, 8, 7 max = 40 passphrase = 3 match = 4 similar = deny random = 42 enforce = everyone retry = 3
# Password requisite/lib/security/$ ISA/pam_cracklib.so retry = 3
Password sufficient pam_unix.so nullok use_authtok md5 shadow use_first_pass
Password required/lib/security/$ ISA/pam_deny.so

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.