LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices

Reply
 
Search this Thread
Old 11-24-2006, 06:49 PM   #1
pnellesen
Member
 
Registered: Oct 2004
Location: Missouri, USA
Distribution: Slackware 12.2, Xubuntu 9.10
Posts: 371

Rep: Reputation: 31
Thumbs up SSH - cannot login as 1 particular user [SOLVED]


Quick summary - I have 1 user in particular who for some reason cannot login via SSH to my server. I have 2 other users that can login with no problems. This problem didn't manifest until I upgraded my Slackware install from 10.2 to 11. There were some "issues" ( ) with that upgrade, but I thought I had worked them out... guess not

More detail:
I have 2 machines, one the server, one a client. Both these machines have a user called "pat". I'm logged into the client machine as "pat", and I'm trying to ssh to the server as "pat" as well: "pat@client: ssh pat@sshserver". It gets to "password" authentication, but my password is rejected. If I try to login as a different user: "pat@client: ssh user2@sshserver", I have no problems at all - user2's password is accepted just fine.

So - technically I CAN login to my ssh server (I know, I can just su to "pat" once I'm there) but I'm going nuts trying to figure out why I can't ssh in as that one user... If you want the ssh -v output, I can add that, but it doesn't really seem to tell a whole lot (i.e. it looks the same regardless of which user I'm trying to ssh in as...)

One final (probably dumb/obvious) question: Could this just be some weird problem with the "pat" user? Would regenerating this user have any effect? If so, how would I make sure that I don't lose the home directory or any permissions related to that user's uid?

Thanks in advance,

Last edited by pnellesen; 11-24-2006 at 10:46 PM.
 
Old 11-24-2006, 07:53 PM   #2
fordeck
Member
 
Registered: Oct 2006
Location: Utah
Posts: 520

Rep: Reputation: 61
Could you post the exact error message you get when you are denied access?

On sshserver, look at the file "/home/pat/.ssh/known_hosts" and look for an entry that begins with "<client machine name>,<client machine ip address>" that match your client machine. Let me know what you find.
 
Old 11-24-2006, 08:27 PM   #3
Klesk1337
LQ Newbie
 
Registered: Jul 2006
Location: Dallas, TX
Distribution: Slackware
Posts: 9

Rep: Reputation: 0
Maybe I'm way off here, but when SSHing from linux, don't you have to specify what user you want to log in as with the "-l" switch, else it defaults to root? Try using your root password to that machine and see if it works. If so, that might be your issue.
 
Old 11-24-2006, 09:38 PM   #4
pnellesen
Member
 
Registered: Oct 2004
Location: Missouri, USA
Distribution: Slackware 12.2, Xubuntu 9.10
Posts: 371

Original Poster
Rep: Reputation: 31
Quote:
Originally Posted by fordeck
On sshserver, look at the file "/home/pat/.ssh/known_hosts" and look for an entry that begins with "<client machine name>,<client machine ip address>" that match your client machine. Let me know what you find.
Ok - I don't see an entry for the client machine in "/home/pat/.ssh/known_hosts" - I do see the entries for the sshserver machine itself, however. They match the ips and names in my /etc/hosts file. In addition, I don't see any "known_hosts" files in the other users' .ssh directories (e.g. "/home/user2/.ssh")

Thanks,
 
Old 11-24-2006, 10:05 PM   #5
fordeck
Member
 
Registered: Oct 2006
Location: Utah
Posts: 520

Rep: Reputation: 61
Just as a test you could try to rename the "/home/pat/.ssh/known_hosts" and then try to ssh again. If it doesn't work you can always put it back.
 
Old 11-24-2006, 10:17 PM   #6
pnellesen
Member
 
Registered: Oct 2004
Location: Missouri, USA
Distribution: Slackware 12.2, Xubuntu 9.10
Posts: 371

Original Poster
Rep: Reputation: 31
Yeah, just tried that. In fact, I renamed the entire .ssh directory entirely. Restarted SSHD. Still no luck. I'm stumped. Here's another weird thing - if I ssh in as "user2" , then do an "su - user3", I'm asked for user3's password, as expected. If I "su - pat" instead, I'm NOT asked for pat's password. This holds for any user I ssh in as. I'm beginning to suspect this isn't SSH related at all, except for the fact that I can physically login to the machine itself as "pat" with no problems. Are there any groups a user can belong to that might cause this behavior? "pat" is not a member of "root", but it is a member of several other groups. The other 2 users are only members of "users".
 
Old 11-24-2006, 10:49 PM   #7
pnellesen
Member
 
Registered: Oct 2004
Location: Missouri, USA
Distribution: Slackware 12.2, Xubuntu 9.10
Posts: 371

Original Poster
Rep: Reputation: 31
[SOLVED] - I reset the password for the user "pat". SSH logins work as expected now, as well as "su - pat". If possible would like to know an explanation for what might have happened.

Thanks for the help.
 
Old 11-24-2006, 11:25 PM   #8
chort
Senior Member
 
Registered: Jul 2003
Location: Silicon Valley, USA
Distribution: OpenBSD 4.6, OS X 10.6.2, CentOS 4 & 5
Posts: 3,660

Rep: Reputation: 69
Either the password hash for "pat" got corrupted on the server, or the password was removed entirely. If you could su to pat w/o a password, then it was the latter. If su to pat failed, then it was the former. SSH will prevent logins with null passwords by default.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
ssh login without password for only one user zhjim Linux - Server 4 11-21-2006 04:31 PM
Add a new SSH login/user Temujin_12 Linux - Networking 2 12-31-2004 10:35 PM
HELP me on SSH User login manya Linux - Security 1 05-03-2004 03:56 PM
how can i restrick user to login with ssh? davidrios Linux - Networking 1 04-27-2004 05:59 PM
SSH login problem - cannot choose user atom Linux - Networking 2 02-29-2004 11:53 AM


All times are GMT -5. The time now is 03:16 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration