+1 vote
in Linux by
How can an administrator know whether a user account is locked or not?

1 Answer

0 votes
by

To check if the user account is locked or not just run this command in the shell:

passwd –S <username>

Or search for the grep username in the location /etc/shadow file and it will show a symbol ‘!’ prefix to the encrypted field in the password box.

To just unlock the password type this command:

passwd –u <username>

If there is a double exclamation mark then run this command two times:

usermod –U <username>

Related questions

0 votes
asked Oct 2, 2023 in Python Imaging Library by sharadyadav1986
0 votes
asked Dec 25, 2023 in Linux by GeorgeBell
...