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

 

posted @   goldtree358  阅读(1245)  评论(0编辑  收藏  举报
相关博文:
阅读排行:
· 震惊!C++程序真的从main开始吗?99%的程序员都答错了
· 【硬核科普】Trae如何「偷看」你的代码?零基础破解AI编程运行原理
· 单元测试从入门到精通
· 上周热点回顾(3.3-3.9)
· winform 绘制太阳,地球,月球 运作规律
历史上的今天:
2019-09-29 数据类型---列表
2019-09-29 文本内容替换
2019-09-29 多级菜单练习
2019-09-29 登录接口练习
点击右上角即可分享
微信分享提示