美文网首页
chage命令

chage命令

作者: 与狼共舞666 | 来源:发表于2022-03-25 10:37 被阅读0次
  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
  1. 设置锁止
    Force the user account to be locked after X number of inactivity days
chage -I 10 dhinesh
  1. 设置超时
    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

相关文章

网友评论

      本文标题:chage命令

      本文链接:https://www.haomeiwen.com/subject/ppirjrtx.html