About Password Complexity settings in linux, and about linux passwords

Source: Internet
Author: User

About Password Complexity settings in linux, and about linux passwords

How to Set Password Complexity in linux:

(1) modify the/etc/login. defs File

PASS_MAX_DAYS90# Maximum Password Expiration days

PASS_MIN_DAYS80# Minimum Password Expiration days

PASS_MIN_LEN10# Minimum Password Length

PASS_WARN_AGE7# Password Expiration Warning days

(2) modify the/etc/pam. d/system-auth file

Replace the following line with password requisite pam_cracklib.so:

PasswordRequisitePam_cracklib.so retry = 5Difok = 3 minlen = 10 ucredit =-1 lcredit =-3 dcredit =-3 dictpath =/usr/share/cracklib/pw_dict

Parameter description:

Number of attempts: 5Minimum character: 3 Minimum Password Length: 10Minimum capital letters: 1 minimum lowercase letters: 3 minimum numbers: 3 password dictionary:/usr/share/cracklib/pw_dict

Note: After modification, you may immediately test:

UseraddTest

Passwd test

It doesn't work, huh, huh. This is because you are running as root. After exiting the root identity, use test to log on and change the password.

Does it take effect? It should work.

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.