|
转自原文:https://blog.csdn.net/wh211212/article/details/53992772 设置最小密码长度:(不少于8个字符) authconfig --passminlen=8 --update 测试查看是否更新成功: grep "^minlen" /etc/security/pwquality.conf 设置同一类的允许连续字符的最大数目: authconfig --passmaxclassrepeat=4 --update 测试查看是否更新成功: grep "^maxclassrepeat" /etc/security/pwquality.conf 新密码中至少需要一个小写字符: authconfig --enablereqlower --update 测试查看是否更新成功: grep "^lcredit" /etc/security/pwquality.conf 新密码中至少需要一个大写字符: authconfig --enablerequpper --update 测试查看是否更新成功: grep "^ucredit" /etc/security/pwquality.conf 新密码中至少需要一个数字: authconfig --enablereqdigit --update 测试查看是否更新成功: grep "^dcredit" /etc/security/pwquality.conf 新密码包括至少一个特殊字符: authconfig --enablereqother --update 测试查看是否更新成功: grep "^ocredit" /etc/security/pwquality.conf 为新密码设置hash/crypt算法(默认为sha512): 查看当前算法:authconfig --test | grep hashing 若不是建议更新:authconfig --passalgo=sha512 --update |