yozza
Posts: 8
Joined: Sun Oct 28, 2012 9:07 pm

putty exits when user logs on except for pi

Mon Oct 29, 2012 11:32 am

Hi,
have been using my RPi running wheezydebian happily over my network with putty logged in as pi. Everythig worked and works fine. Just created a new user with adduser and added password, however, this user is unable to log in via putty. The login and pasword are accepted and then the putty window closes. Tried some changes to ssh configuration but not getting anywhere. I can login in as pi and then su to user with no problems. Anyone got any clues?

User avatar
tedhale
Posts: 114
Joined: Thu Sep 20, 2012 4:52 pm
Location: Williamsburg, VA, USA
Contact: Website

Re: putty exits when user logs on except for pi

Mon Oct 29, 2012 1:12 pm

The adduser script should have set everything up OK, but something is obviously wrong.
It sounds like the password is accepted, so the user is not locked out.
The first thing that comes to mind is that the new user does not have a valid shell defined.
do this:
cat /etc/passwd
and look at the line for the new user. it should end with :/bin/bash
Some accounts are disabled and will have their shell set to /bin/false

If that is the problem, it can be fixed with:
sudo usermod -s /bin/bash newusername
This will set the shell for the new use to the bash shell.
- Ted B. Hale
http://raspberrypihobbyist.blogspot.com

yozza
Posts: 8
Joined: Sun Oct 28, 2012 9:07 pm

Re: putty exits when user logs on except for pi

Mon Oct 29, 2012 6:28 pm

Thank you Ted, absolutely spot on - no idea why it had /bin/false in there, but all resolved with your suggestion.
Thanks

Return to “Beginners”