redhat 8 密码复杂度设置
redhat 8 密码复杂度设置
Enable securetty PAM module - Red Hat Customer Portal
https://access.redhat.com/solutions/5027331
What is pam_faillock and how to use it in Red Hat Enterprise Linux? - Red Hat Customer Portal
In In Red Hat Enterprise Linux 8, authconfig command is replaced by authselect utility.
We do not recommend you make modifications directly in PAM global files system-auth and password-auth available under /etc/pam.d/` directory.
In Red Hat Enterprise Linux 8 default configuration file for password complexity is /etc/security/pwquality.conf.
修改策略前,先创建用户配置文件
1 authselect list ----------- 查看可用的profile
2 authselect current -------- 查看当前使用的profile
3 authseletc apply-changes -b --backup=sssd.backup ---------- 备份当前使用的profile
4 authselect create-profile password-policy -b sssd --symlink-meta --symlink-pam --------- 创建用户配置文件
Newly created profile will be available at location: /etc/authselect/custom/password-policy/
5
authselect select custom/password-policy
authselect current
-------------- 切换使用创建的profile
6
authselect enable-feature with-mkhomedir
authselect enable-feature with-faillock
authselect enable-feature with-fingerprint
authselect enable-feature with-silent-lastlog
authselect disable-feature with-silent-lastlog
With RHEL 8.2 release, pam_faillock can now read settings from faillock.conf configuration file located at /etc/security/faillock.conf. For example:
deny=4
unlock_time=1200
silent
7 Make desired/custom changes in global PAM config files system-auth and password-auth available under custom profile directory /etc/authselect/custom/password-policy/. Once changes are made apply them with command:
authselect apply-changes
Requirement 1. Keep history of used passwords (the number of previous passwords which cannot be reused).
Insert the following line in /etc/authselect/custom/password-policy/system-auth and /etc/authselect/custom/password-policy/password-auth files (after pam_pwquality.so line:
password requisite pam_pwhistory.so remember=5 use_authtok
Requirement 2. Enforce root for password complexity.
Insert/append the following option in pam_pwquality.so line under password section in /etc/authselect/custom/password-policy/system-auth and /etc/authselect/custom/password-policy/password-auth files:
enforce_for_root
执行生效
authselect apply-changes
For requirements from 3 to 11:
Set appropriate options in the file /etc/security/pwquality.conf.
minlen = 9
dcredit = -1
ucredit = -1
lcredit = 1
ocredit = 1
minclass = 1
maxrepeat = 2
maxclassrepeat = 2
difok = 5
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 震惊!C++程序真的从main开始吗?99%的程序员都答错了
· 【硬核科普】Trae如何「偷看」你的代码?零基础破解AI编程运行原理
· 单元测试从入门到精通
· 上周热点回顾(3.3-3.9)
· winform 绘制太阳,地球,月球 运作规律
2019-09-29 数据类型---列表
2019-09-29 文本内容替换
2019-09-29 多级菜单练习
2019-09-29 登录接口练习