# Password aging controls:
#
# PASS_MAX_DAYS Maximum number of days a password may be used.
# PASS_MIN_DAYS Minimum number of days allowed between password changes.
# PASS_MIN_LEN Minimum acceptable password length.
# PASS_WARN_AGE Number of days warning given before a password expires.
#
PASS_MAX_DAYS 90 # 新建用户密码最长使用天数
PASS_MIN_DAYS 0 # 新建用户密码最短使用天数
PASS_MIN_LEN 7 # 新建用户密码到期提示天数
PASS_WARN_AGE 10 # 最小密码长度
[/pre] 设置口令复杂度:
设置新建用户时输入的口令复杂程度,该配置默认在cat /etc/pam.d/system-auth 文件中存放。
[pre]
[root@localhost ~]# vim /etc/pam.d/system-auth
# If you want to change the port on a SELinux system, you have to tell
# SELinux about this change.
# semanage port -a -t ssh_port_t -p tcp #PORTNUMBER
#
Port 65534 # 登录端口改为65534
MaxAuthTries=3 # 密码最大尝试次数3