Linux用户锁定、解锁及锁定查看

[root@l01 ~]# passwd -S pispread
pispread PS 2020-04-30 7 99999 15 -1 (Password set, SHA512 crypt.)用户锁定
[root@l01 ~]# passwd -l pispread
Locking password for user pispread.
passwd: Success查看用户
[root@l01 ~]# passwd -S pispread
pispread LK 2020-04-30 7 99999 15 -1 (Password locked.)用户解锁
[root@l01 ~]# passwd -u pispread
Unlocking password for user pispread.
passwd: Success查看用户
[root@l01 ~]# passwd -S pispread
pispread PS 2020-04-30 7 99999 15 -1 (Password set, SHA512 crypt.)

 

passwd -u 解锁不生效时试试这个

pam_tally2 --user=username --reset

 

你可能感兴趣的:(Linux用户锁定、解锁及锁定查看)