[root@xd04dm01 ~]# chage -l oracle Last password change : May 12, 2015 Password expires : Aug 12, 2015 Password inactive : never Account expires : never Minimum number of days between password change : 1 Maximum number of days between password change : 90 Number of days of warning before password expires : 7 [root@xd04dm01 ~]#
对已有用户可以通过下面的命令来实现
非交互式
[root@xd04dm01 ~]# chage -I -1 -m 0 -M 99999 -E -1 oracle交互式
[root@xd04dm01 ~]# chage oracle
关闭密码复杂度校验
修改/etc/pam.d/system-auth和/etc/pam.d/password-auth文件
注释下面的行
#password requisite pam_passwdqc.so min=disabled,disabled,16,12,8 similar=deny enforce=everyone max=40#password sufficient pam_unix.so try_first_pass use_authtok sha512 shadow remember=10
增加下面的内容
password requisite pam_cracklib.so try_first_pass retry=3
password sufficient pam_unix.so sha512 shadow nullok try_first_pass use_authtok
对新建用户可以通过修改/etc/login.defs文件来修改过期天数
#cat /etc/login.defs
PASS_MAX_DAYS 999999
PASS_MIN_DAYS 0