linux 使用chage 设置密码永不过期

    vmware安装的虚拟机, 今天登录忽然提示“You must change your password now and login again!”, 密码过期了, 我登录设置了ssh免密登录, 输入原始密码,输入新密码后解决。修改成功登录后看了下,密码有效期60天。 通过chage 修改应用用户密码永不过期。
weida@vm-134:~$ chage -l weida
Last password change : Apr 28, 2019
Password expires : Jun 27, 2019
Password inactive : Jul 07, 2019
Account expires : never
Minimum number of days between password change : 0
Maximum number of days between password change : 60
Number of days of warning before password expires : 7
设置密码永不过期:
root@vm-134:/home/weida# chage -M -1 weida
root@vm-134:/home/weida# chage -l weida
Last password change : Apr 28, 2019
Password expires : never
Password inactive : never
Account expires : never
Minimum number of days between password change : 0
Maximum number of days between password change : -1
Number of days of warning before password expires : 7

Be First to Comment

发表评论

电子邮件地址不会被公开。 必填项已用*标注