我发现了大量关于如何启用密码复杂性的文章,有人可以指导我如何禁用它吗?(oracle linux)
这是我的系统身份验证
#%PAM-1.0
# This file is auto-generated.
# User changes will be destroyed the next time authconfig is run.
auth required pam_env.so
auth sufficient pam_unix.so nullok try_first_pass
auth requisite pam_succeed_if.so uid >= 500 quiet
auth required pam_deny.so
account required pam_unix.so
account sufficient pam_succeed_if.so uid < 500 quiet
account required pam_permit.so
password requisite pam_cracklib.so try_first_pass retry=3
#password requisite pam_passwdqc.so min=N0,disabled,12,8,7 retry=3
password sufficient pam_unix.so md5 shadow nullok try_first_pass use_authtok
password required pam_deny.so
#password [success=1 default=ignore] pam_unix.so minlen=1 sha512
session optional pam_keyinit.so revoke
session required pam_limits.so
session [success=1 default=ignore] pam_succeed_if.so service in crond quiet use_uid
session required pam_unix.so
注释掉 pam_cracklib.so 或更改参数,只会破坏 pam 并使 passwd 完全无法使用。谢谢
答案1
PAM 模块 pam_cracklib 负责测试密码的复杂性。配置如下。
#password requisite pam_cracklib.so try_first_pass retry=3 type=
password sufficient pam_unix.so sha512 shadow nullok
password sufficient pam_sss.so use_authtok
password required pam_deny.so