使用pam_cracklib的密码策略不适用于gui中的root

时间:2015-02-19 10:31:03

标签: linux redhat password-policy

我现在正在使用Red Hat 6.6,尝试为root用户强制实施密码策略。我的/etc/pam.d/system-auth文件包含以下行:

#%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_fprintd.so
auth        required      pam_tally2.so deny=5 unlock_time=900
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_tally2.so
account     required      pam_unix.so
account     sufficient    pam_localuser.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 type= ucredit=-1 lcredit=-1 dcredit=-1 ocredit=-1 maxrepeat=3 \
                                          reject_username enforce_for_root
password    sufficient    /lib64/security/pam_unix.so sha512 shadow nullok remember=5 use_authtok
password    required      pam_deny.so

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

适用于passwd命令,当我尝试将密码更改为简单(如'123')时,它不接受密码。

但是当我试图通过GUI(gnome2,system-config-users实用程序)进行更改时,它只会抛出有关密码错误的警告,无论如何我都可以应用弱密码。

如何通过GUI拒绝设置弱密码?

0 个答案:

没有答案