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>