I am unable to log into a regular user account using a password, so I first change the password to something I know... As root,
passwd theUserput in the password: thepassword
it states it updates successfully
passwd: all authenication tokens updated successfully
I then can
su - theUserand Im now this user..I try
su - theUserit asks me for the password,I put in the one I just assigned to it and it fails with
su: incorrect passwordI even try to ssh into the box with that user and the password still fails.
93 Answers
There are several places to check.
/etc/passwd- maybe the user has not access to a "valid shell"; if the line corresponding to this user ends with/bin/false, then this user does not have access to the command-line shell/etc/hosts.allowand/etc/hosts.deny- access control/etc/ssh/sshd_config- ssh configuration/etc/security/access.conf- security setting/etc/pam.d/sshdand/etc/pam.d/system-auth-ac- PAM settings
Using ssh -vv for verbose output may help.
And a user reported that reinstalling ssh resolved his issue.
17On centos I had a user account that was 'locked' which I unlocked with the following:
faillock --user usernameGoesHere --reset 1 Based on the answer from Chris, I used this command on a similar issue, with success:
faillog --user usernameGoesHere --reset 2