[SOLVED] User unable to log in via SSH, but only that user
Linux - ServerThis forum is for the discussion of Linux Software used in a server related context.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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.
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.
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.
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?
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.
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.
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.
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.