linux设置密码过期时间/etc/login.defs
Linux下对于新添加的用户,用户密码过期时间是从 /etc/login.defs 中 PASS_MAX_DAYS 提取的,普通系统默认就是99999, 而有些安全操作系统是90。更改此处,只是让新建的用户默认密码过期时间变化,已有用户密码过期时间仍然不变。 [root@linuxidc ~]# chage --help Usage: chage [options] user Options: -d, --lastday LAST_DAY set last password change to LAST_DAY -E, --expiredate EXPIRE_DATE set account expiration date to EXPIRE_DATE -h, --help display this help message and exit -I, --inactive INACTIVE set password inactive after expiration to INACTIVE -l, --list show account aging information -m, --mindays MIN_DAYS set minimum number of days before password change to MIN_DAYS -M, --maxdays MAX