Fedora
Fedora 32/33 - 刪除密碼強度強制
Fedora 32/33 不允許我為 root 和使用者選擇短密碼。在這種情況下,我想允許它,但我不能這樣做:
❯ sudo passwd Changing password for user root. New password: BAD PASSWORD: The password is shorter than 8 characters Retype new password: passwd: Authentication token manipulation error
所以我試圖了解設置這些設置的 2 個文件,但我迷路了。
❯ cat /etc/pam.d/password-auth # Generated by authselect # Do not modify this file manually. auth required pam_env.so auth required pam_faildelay.so delay=2000000 auth [default=1 ignore=ignore success=ok] pam_usertype.so isregular auth [default=1 ignore=ignore success=ok] pam_localuser.so auth sufficient pam_unix.so nullok try_first_pass auth [default=1 ignore=ignore success=ok] pam_usertype.so isregular auth sufficient pam_sss.so forward_pass auth required pam_deny.so account required pam_unix.so account sufficient pam_localuser.so account sufficient pam_usertype.so issystem account [default=bad success=ok user_unknown=ignore] pam_sss.so account required pam_permit.so password requisite pam_pwquality.so try_first_pass local_users_only password sufficient pam_unix.so sha512 shadow nullok try_first_pass use_authtok password sufficient pam_sss.so use_authtok password required pam_deny.so session optional pam_keyinit.so revoke session required pam_limits.so -session optional pam_systemd.so session [success=1 default=ignore] pam_succeed_if.so service in crond quiet use_uid session required pam_unix.so session optional pam_sss.so
和
❯ cat /etc/pam.d/passwd #%PAM-1.0 # This tool only uses the password stack. password substack system-auth -password optional pam_gnome_keyring.so use_authtok password substack postlogin
在 Fedora 32 中,密碼質量配置文件是
/etc/security/pwquality.conf
和/etc/security/pwquality.conf.d/*
例如,最小密碼長度:
# Configuration for systemwide password quality limits # Defaults: # # Minimum acceptable size for the new password (plus one if # credits are not disabled which is the default). (See pam_cracklib manual.) # Cannot be set to lower value than 6. # minlen = 8
相關的手冊頁是
pwquality.conf(5)
和pam_pwquality(5)
。