linux 用戶密碼到期致使ftp業務失敗

外網反饋某業務失敗,查看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

相關文章
相關標籤/搜索