1. 设置永不过期
chage -m 0 -M 99999 -I -1 -E -1 test
[root@VM_99_232_centos ~]# chage -l test
Last password change : Jan 14, 2021
Password expires : Apr 14, 2021
Password inactive : never
Account expires : Jan 02, 1970
Minimum number of days between password change : 7
Maximum number of days between password change : 90
Number of days of warning before password expires : 7
[root@VM_99_232_centos ~]#
[root@VM_99_232_centos ~]#
[root@VM_99_232_centos ~]# chage -m 0 -M 99999 -I -1 -E -1 test
[root@VM_99_232_centos ~]# chage -l test
Last password change : Jan 14, 2021
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
2. 设置锁止
Force the user account to be locked after X number of inactivity days
chage -I 10 dhinesh
3. 设置超时
Set the Account Expiry Date for an User
chage -E "2009-05-31" dhinesh
Set Password Expiry Date for an user using chage option -M
chage -M 10 dhinesh
网友评论