Think before you speak, read before you think.

linux 用户密码过期

明明使用 公私钥 登陆,确提示密码不对。

使用 chage 来防止密码过期。

查看当前的过期时间

chage -l vagrant
Last password change					: never
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	: 7

设置密码永不过期

chage -m 0 -M 99999 -I -1 -E -1 vagrant

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *