Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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  theUser

put in the password: thepassword

it states it updates successfully

passwd: all authenication tokens updated successfully

I then can

su - theUser

and Im now this user..I try

su - theUser

it asks me for the password,I put in the one I just assigned to it and it fails with

su: incorrect password

I even try to ssh into the box with that user and the password still fails.

share|improve this question

migrated from stackoverflow.com Mar 4 '12 at 19:59

This question came from our site for professional and enthusiast programmers.

    
Are you sure you're entering the same password each time? Copy-and-paste it, don't retype it. –  Keith Thompson Mar 4 '12 at 19:59
    
what means "login fails"? Please be verbose here... –  Jörg Beyer Mar 4 '12 at 20:03
    
There is no /bin/false in the passwd file for this user. I am cutting and pasting the password. the Logins fails with "su: incorrect password –  BillyCups Mar 4 '12 at 20:05
    
"su: incorrect password" is suspicious, since su is not part of the normal login. –  Jörg Beyer Mar 4 '12 at 20:15
    
something that is interesting.. If I ssh from another box to this server and put in the correct password.. it instantly returns with "Connection closed by 22.22.22.22"... if I try to ssh in and on purpose put the wrong password, it says "Permission denied, please try again" so it knows the what the right password is ..it just won't let me in.. –  BillyCups Mar 4 '12 at 20:18
show 4 more comments

1 Answer

up vote 1 down vote accepted

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.allow and /etc/hosts.deny - access control

  • /etc/ssh/sshd_config - ssh configuration

  • /etc/security/access.conf - security setting

  • /etc/pam.d/sshd and /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.

share|improve this answer
    
There is no /bin/false in the passwd for this user. I am cutting and pasting the password. the Logins fails with "su: incorrect password" –  BillyCups Mar 4 '12 at 20:05
    
Try a simple password, just as a test. Something like 'abc123'. Does it work? Do not copy/paste in this simple test. –  J. Bruni Mar 4 '12 at 20:07
    
I just tried qwer1234 as the password and still no luck :( I mean it supposedly sets the new password but still can't log in with it –  BillyCups Mar 4 '12 at 20:09
    
I'd check /etc/ssh/sshd_config... related configs: PasswordAuthentication, UsePAM, KerberosAuthentication, AllowUsers... –  J. Bruni Mar 4 '12 at 20:14
    
something that is interesting.. If I ssh from another box to this server and put in the correct password.. it instantly returns with "Connection closed by 22.22.22.22"... if I try to ssh in and on purpose put the wrong password, it says "Permission denied, please try again" so it knows the what the right password is ..it just won't let me in.. –  BillyCups Mar 4 '12 at 20:19
show 12 more comments

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.