Saturday, August 26, 2023

How to check the lock status of any Linux user Account ?

 


If user Locked 


[root@10.1.1.1 ~]#

[root@10.1.1.1 ~]# passwd -S postgres

postgres LK 2022-10-04 -1 -1 -1 -1 (Password locked.)

[root@10.1.1.1 ~]#

[root@10.1.1.1 ~]#



If user Unlocked



[root@10.1.1.1 ~]#

[root@10.1.1.1 ~]#

[root@10.1.1.1 ~]# passwd -S postgres

postgres PS 2022-10-04 -1 -1 -1 -1 (Password set, SHA512 crypt.)

[root@10.1.1.1 ~]#

[root@10.1.1.1 ~]#



========================

LK: Password locked

NP: No password

PS: Password set

1 comment: