外网反馈某业务失败,查看log发现FTP链接失败,定位发现提示密码不对,从新修改FTP密码后恢复正常。 但同时定位了下FTP密码被修改的缘由,发现是密码过时了,所以查了下资料,查得修改过时时间的方法vim
1.vim /etc/login.defs PASS_MAX_DAYS 99999this
2.chage username -M 99999orm
下面是使用到的命令chage: [root@APPServer yang]# chage --help Usage: chage [options] [LOGIN]it
Options: -d, --lastday LAST_DAY set date of 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_DAYS set maximim number of days before password change to MAX_DAYS -W, --warndays WARN_DAYS set expiration warning days to WARN_DAYSio
以及一个不过时的帐户信息: [root@APPServer yang]# chage username -l Last password change : May 17, 2018 Password expires : never Password inactive : never Account expires : never Minimum number of days between password change : 0 Maximum number of days between password change : 99999 Number of days of warning before password expires : 7ast