Setting password complexity in Linux

Time:2021-1-20

Everyone knows thatLinuxThe default policy is very safe, but we still need to do some fine-tuning to make it more secure. Weak password has security risks, so please pay special attention. We need to change the complexity of the password to improve security

Setting password complexity in Linux

First, modify the / etc / PAM. D / system auth file

Setting password complexity in Linux

Find the password requisition PAM_ cracklib.so Replace this line with 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

Setting password complexity in Linux
After repairing, save and exit, modify MZJ user password, try 000000 and find that it is not allowed. You can only set complex password according to the requirements.
Parameter meaning:
Number of attempts: 5
Minimum different characters: 3
Minimum password length: 10
Minimum capital letters: 1
Minimum lowercase letters: 3
Minimum number: 3
Password dictionary / usr / share / cracklib / PW_ dict

Original address of this article:https://www.linuxprobe.com/linux-mima.htmlEditor: Wang Huachao, auditor: Fu zengbao

Recommended Today

How to Build a Cybersecurity Career

Original text:How to Build a Cybersecurity Career How to build the cause of network security Normative guidelines for building a successful career in the field of information security fromDaniel miesslerstayinformation safetyCreated / updated: December 17, 2019 I’ve been doing itinformation safety(now many people call it network security) it’s been about 20 years, and I’ve spent […]