- Mastering Linux Security and Hardening
- Donald A. Tevault
- 223字
- 2021-07-02 19:19:24
Hands-on lab for setting password complexity criteria
For this lab, you can use either the CentOS or Ubuntu virtual machine, as desired. The only difference is that you won't perform Step 1 for CentOS:
- For Ubuntu only, install the libpam-pwquality package:
sudo apt install libpam-pwquality
- Open the /etc/security/pwquality.conf file in your preferred text editor. Remove the comment symbol from in front of the minlen line and change the value to 19. It should now look like this:
minlen = 19
Save the file and exit the editor.
- Create a user account for Goldie and attempt to assign her the passwords, turkeylips, TurkeyLips, and Turkey93Lips. Note the change in each warning message.
- In the pwquality.conf file, comment out the minlen line. Uncomment the minclass line and the maxclassrepeat line. Change the maxclassrepeat value to 5. The lines should now look like:
minclass = 3
maxclassrepeat = 5
Save the file and exit the text editor.
- Try assigning various passwords that don't meet the complexity criteria that you've set to Goldie's account and view the results.
In the /etc/login.defs file on your CentOS machine, you'll see the line:
PASS_MIN_LEN 5
Supposedly, this is to set the minimum password length, but in reality, pwquality overrides it. So, you could set this value to anything at all, and it would have no effect.
推薦閱讀
- Android應(yīng)用安全實(shí)戰(zhàn):Frida協(xié)議分析
- 特種木馬防御與檢測(cè)技術(shù)研究
- Wireshark 2 Quick Start Guide
- 走進(jìn)新安全:讀懂網(wǎng)絡(luò)安全威脅、技術(shù)與新思想
- 工業(yè)控制網(wǎng)絡(luò)安全技術(shù)
- 安全技術(shù)運(yùn)營(yíng):方法與實(shí)踐
- 網(wǎng)絡(luò)安全態(tài)勢(shì)感知
- 云計(jì)算安全防護(hù)技術(shù)
- 網(wǎng)絡(luò)空間安全導(dǎo)論
- 交換機(jī)·路由器·防火墻(第2版)
- 云計(jì)算安全:關(guān)鍵技術(shù)、原理及應(yīng)用
- 網(wǎng)絡(luò)安全監(jiān)控實(shí)戰(zhàn):深入理解事件檢測(cè)與響應(yīng)
- 網(wǎng)絡(luò)安全設(shè)計(jì)
- 防火墻和VPN技術(shù)與實(shí)踐
- 網(wǎng)絡(luò)空間安全原理與實(shí)踐