In a huge user list, you might want to query a particular user account lock status. This section guides you on how to query the lock status.
To get lock status, simply query it from the /etc/shadow
file like this:
grep -E --color '<user>' cat /etc/shadow
Look for the single/double exclamation mark in front of the password.
A single exclamation mark means the account is locked while a double means the account is locked and password is not set.
That's all for getting user account lock status.