LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 08-31-2011, 02:31 PM   #1
theillien
Member
 
Registered: Jan 2004
Posts: 112

Rep: Reputation: 1
User unable to log in via SSH, but only that user


I created a VM by copying a gold image that we have. I then created a user for our customer. I set his password and informed him of it. He attempted to log in. The SSH connection was established, but his password is denied. I've deleted and recreated the account, verfied I can log in using my username/password.

The only thing I've seen out of the ordinary is that setting DEBUG in sshd_config displays "unable to open /var/log/btmp: file does not exist" in /var/log/secure.

Anyone have any idea why this would be happening?
 
Old 08-31-2011, 03:02 PM   #2
T3RM1NVT0R
Senior Member
 
Registered: Dec 2010
Location: Internet
Distribution: Linux Mint, SLES, CentOS, Red Hat
Posts: 2,385

Rep: Reputation: 477Reputation: 477Reputation: 477Reputation: 477Reputation: 477
@ Reply

Hi there,

Here are few questions and suggestions:

1. Which distribution of linux this is.

2. How did you create his account? Using command line or using gui? If using command line, did you give a try re-creating his account using gui.

3. Only his user account is having problem or couple of other user accounts as well?

4. If you have created the user account using command line. Did you created his home directory? If yes, did you copy everything under /etc/skel to his home directory.

5. Is he having full access on his home directory and is he the owner of the it.

6. Do you see anything in /var/log/messages when he tries to ssh. If yes, please paste the output here.
 
Old 08-31-2011, 03:16 PM   #3
theillien
Member
 
Registered: Jan 2004
Posts: 112

Original Poster
Rep: Reputation: 1
Quote:
Originally Posted by T3RM1NVT0R View Post
Hi there,

Here are few questions and suggestions:

1. Which distribution of linux this is.
RHEL5.5

Quote:
2. How did you create his account? Using command line or using gui? If using command line, did you give a try re-creating his account using gui.
There is no GUI, it's a server. I used useradd to create the account.

Quote:
3. Only his user account is having problem or couple of other user accounts as well?
I tried creating another account and had the same problem. I can't figure out why only my account works.

Quote:
4. If you have created the user account using command line. Did you created his home directory? If yes, did you copy everything under /etc/skel to his home directory.
/etc/skel is copying properly and permissions and ownership are correct.

Quote:
5. Is he having full access on his home directory and is he the owner of the it.
See above.

Quote:
6. Do you see anything in /var/log/messages when he tries to ssh. If yes, please paste the output here.
The only output is that the password failed and the above issue with /var/log/btmp (I touched the file and that log entry went away). The only other thing I noticed is that it verifies the password expiration before prompting so it seems it is reading /etc/shadow properly.
 
Old 08-31-2011, 03:45 PM   #4
ArcLinux
Member
 
Registered: Apr 2005
Location: Fargo, ND
Distribution: Slackware, CentOS
Posts: 87

Rep: Reputation: 20
Quote:
Originally Posted by theillien View Post
I created a VM by copying a gold image that we have. I then created a user for our customer. I set his password and informed him of it. He attempted to log in. The SSH connection was established, but his password is denied. I've deleted and recreated the account, verfied I can log in using my username/password.

The only thing I've seen out of the ordinary is that setting DEBUG in sshd_config displays "unable to open /var/log/btmp: file does not exist" in /var/log/secure.

Anyone have any idea why this would be happening?
Are you allowing password logins?
Is your account logging in using rsa/dsa passwd?
If so, Is your passwd the same as your rsa/dsa key?
 
Old 08-31-2011, 03:51 PM   #5
theillien
Member
 
Registered: Jan 2004
Posts: 112

Original Poster
Rep: Reputation: 1
Quote:
Originally Posted by ArcLinux View Post
Are you allowing password logins?
Is your account logging in using rsa/dsa passwd?
If so, Is your passwd the same as your rsa/dsa key?
Passwords are in use. I've disabled key authentication and have been able to log in using my password. I even copied the user's public key to the server (making sure permissions were correct), but when he attempts to log in it doesn't bother with that and goes straight to password authentication which then fails.

How do I check if I'm using rsa/dsa?
 
Old 08-31-2011, 04:05 PM   #6
ArcLinux
Member
 
Registered: Apr 2005
Location: Fargo, ND
Distribution: Slackware, CentOS
Posts: 87

Rep: Reputation: 20
Quote:
Originally Posted by theillien View Post

How do I check if I'm using rsa/dsa?
You will see a prompt that looks something like this:
Enter passphrase for key '/home/<user>/.ssh/id_dsa':


What do these lines in your /etc/ssh/sshd_config look like?

#RSAAuthentication yes
#PubkeyAuthentication yes
.
.
.
#PasswordAuthentication no
#PermitEmptyPasswords no

Last edited by ArcLinux; 08-31-2011 at 04:06 PM. Reason: spelling
 
Old 08-31-2011, 04:07 PM   #7
theillien
Member
 
Registered: Jan 2004
Posts: 112

Original Poster
Rep: Reputation: 1
Those lines don't actually exist. The image was created before I got here and the sshd_config file is quite minimalistic:

Compression yes
UseDNS no
TCPKeepAlive no
ClientAliveCountMax 0
ClientAliveInterval 600
PermitEmptyPasswords no
#PubkeyAuthentication yes
PubkeyAuthentication no
PermitRootLogin no
#PasswordAuthentication yes
Port 22
Protocol 2
ListenAddress 10.153.106.205
Subsystem sftp /usr/libexec/openssh/sftp-server
SyslogFacility AUTHPRIV
UsePrivilegeSeparation yes
X11Forwarding no
Ciphers aes128-ctr,aes192-ctr,aes256-ctr
Ciphers aes128-ctr,aes192-ctr,aes256-ctr
UsePAM yes
 
Old 08-31-2011, 07:07 PM   #8
T3RM1NVT0R
Senior Member
 
Registered: Dec 2010
Location: Internet
Distribution: Linux Mint, SLES, CentOS, Red Hat
Posts: 2,385

Rep: Reputation: 477Reputation: 477Reputation: 477Reputation: 477Reputation: 477
@ Reply

Pretty interesting issue. I tried to duplicate this but was not able to exactly duplicate. I succeeded in creating user accounts without having ssh access but with different error messages not with the one which you are getting.

There might be some parameters set in /etc/default/useradd or /etc/login.defs which is resulting in user account creation without ssh access. Chances are also there that a parameter is set in /etc/pam.d/login to prevent ssh login

Paste the output of above mentioned files and lets see what we can come up with.
 
Old 08-31-2011, 08:04 PM   #9
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,359

Rep: Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751
Also, can you try ssh -vvv blah .. shows more detail
 
Old 09-01-2011, 05:06 AM   #10
Reuti
Senior Member
 
Registered: Dec 2004
Location: Marburg, Germany
Distribution: openSUSE 15.2
Posts: 1,339

Rep: Reputation: 260Reputation: 260Reputation: 260
Any AllowUsers specified in /etc/ssh/sshd_config which disallow the login for the new user?
 
Old 09-01-2011, 09:03 AM   #11
theillien
Member
 
Registered: Jan 2004
Posts: 112

Original Poster
Rep: Reputation: 1
No. My sshd_config is posted above. Nothing blocking specific users.
 
Old 09-01-2011, 09:30 AM   #12
Reuti
Senior Member
 
Registered: Dec 2004
Location: Marburg, Germany
Distribution: openSUSE 15.2
Posts: 1,339

Rep: Reputation: 260Reputation: 260Reputation: 260
As you wrote it’s a VM: there are outside ports defined on the real machine which are mapped to the individual virtual machines’s port 22?
 
Old 09-01-2011, 09:42 AM   #13
theillien
Member
 
Registered: Jan 2004
Posts: 112

Original Poster
Rep: Reputation: 1
SSH is open on the cloud firewall (cloud being what they call it. Personally, I loathe that word for this technology). I've created VMs using other images that don't have this problem.
 
Old 09-01-2011, 01:58 PM   #14
T3RM1NVT0R
Senior Member
 
Registered: Dec 2010
Location: Internet
Distribution: Linux Mint, SLES, CentOS, Red Hat
Posts: 2,385

Rep: Reputation: 477Reputation: 477Reputation: 477Reputation: 477Reputation: 477
@ Reply

@ theillien

Did you check the files which I mentioned before.

@ Reuti

Does not appear to be firewall/ports issue the reason being one user is able to login. I can think of tcp wrappers but I am guessing that he is using the same machine to ssh this machine using his account and problematic user account. So tcp wrappers will not come in picture.
 
Old 09-01-2011, 02:05 PM   #15
theillien
Member
 
Registered: Jan 2004
Posts: 112

Original Poster
Rep: Reputation: 1
I have not had an opportunity yet. I'll post them as soon as I'm able.
 
  


Reply



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
How do I prevent a user from being able to log into ssh? scooper Solaris / OpenSolaris 3 04-08-2009 10:50 AM
Unable Log-in any longer as LFS User spadeandarcher Linux From Scratch 4 10-28-2006 08:17 PM
user unable to connect to X(other then the log'd one) jabka Linux - General 4 07-07-2006 03:59 AM
C program to see user log on in system and print user with real user name also naveen245 Programming 2 12-21-2005 12:53 AM
unable to log in to a user account cheema Mandriva 1 12-25-2004 09:34 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 12:50 PM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration