1、修改 /etc/login.defs 文件红色部分
#PASS_MAX_DAYS 密码可能被使用最大的天数。
#PASS_MIN_DAYS 最小的天数之间不允许更改密码。
#PASS_MIN_LEN 密码最小长度。
#PASS_WARN_AGE 密码到期前给予警告的天数。
#
PASS_MAX_DAYS 99999
PASS_MIN_DAYS 0
PASS_MIN_LEN 5
PASS_WARN_AGE 7
#
2、修改 /etc/pam.d/system-auth 文件如下,注意红色部分 【6688电子商务网站 】
#%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 required pam_tally.so onerr=fail deny=3 unlock_time=1800
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
account required pam_tally.so
password requisite pam_cracklib.so retry=3 minlen=8 lcredit=-1 ucredit=-1 dcredit=-1 ocredit=-1 difok=3
password sufficient pam_unix.so md5 shadow nullok try_first_pass use_authtok remember=3
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