我安装了libpam-pwquality
:
sudo apt-get install libpam-pwquality
并配置/etc/pam.d/common-password
:
password requisite pam_pwquality.so retry=3 minlen=10
password [success=1 default=ignore] pam_unix.so obscure use_authtok try_first_pass sha512
password required pam_deny.so
password required pam_permit.so
然后当我运行时passwd
,我仍然可以设置2或3个字符的密码。缺少什么?
答案1
您需要在 pwquality 的配置文件/etc/security/pwquality.conf
.