Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Can no longer ssh into box as a normal user
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
Parabola
n00b
n00b


Joined: 29 Aug 2002
Posts: 54

PostPosted: Thu Nov 21, 2002 4:08 pm    Post subject: Can no longer ssh into box as a normal user Reply with quote

only as root.

What changed?

Seems to have started after a -u world that updated baselayout. I've looked through the sshd_config file but nothing seems obvious. I've never had to do anything to make this work before....
_________________
Josh
Back to top
View user's profile Send private message
rac
Bodhisattva
Bodhisattva


Joined: 30 May 2002
Posts: 6553
Location: Japanifornia

PostPosted: Thu Nov 21, 2002 4:54 pm    Post subject: Reply with quote

You didn't happen to overwrite your /etc/passwd, did you?
_________________
For every higher wall, there is a taller ladder
Back to top
View user's profile Send private message
Parabola
n00b
n00b


Joined: 29 Aug 2002
Posts: 54

PostPosted: Thu Nov 21, 2002 5:22 pm    Post subject: Reply with quote

Nope, it still looks good.
_________________
Josh
Back to top
View user's profile Send private message
Dalrain
Tux's lil' helper
Tux's lil' helper


Joined: 02 Jul 2002
Posts: 136
Location: Wooster, OH USA

PostPosted: Thu Nov 21, 2002 7:09 pm    Post subject: Reply with quote

I am also having this problem, same check on the password file and all after the latest baselayout change. It all still looks good, and I can still login from the console, just regular users can no longer SSH. No joy :(
Back to top
View user's profile Send private message
Dalrain
Tux's lil' helper
Tux's lil' helper


Joined: 02 Jul 2002
Posts: 136
Location: Wooster, OH USA

PostPosted: Thu Nov 21, 2002 7:15 pm    Post subject: Reply with quote

Note: This happens with two systems of mine, both running withOUT the unstable flag, if that makes any difference. Could be something got weird with the stable systems only?
Back to top
View user's profile Send private message
rac
Bodhisattva
Bodhisattva


Joined: 30 May 2002
Posts: 6553
Location: Japanifornia

PostPosted: Thu Nov 21, 2002 7:18 pm    Post subject: Reply with quote

Does running ssh with the -v flag give any useful hints?
_________________
For every higher wall, there is a taller ladder
Back to top
View user's profile Send private message
theclaus
n00b
n00b


Joined: 08 Oct 2002
Posts: 64
Location: Boise, ID

PostPosted: Thu Nov 21, 2002 8:41 pm    Post subject: Reply with quote

Okay I had this problem and someone on IRC helped me out. This is what he said to do.

[08:45] <vegai> TheClaus: try usermod -s /bin/bash user

When I did that it worked. Though while I was at it I also did a etc-update. After that I tried ssh as normal user and it worked great.
Back to top
View user's profile Send private message
Parabola
n00b
n00b


Joined: 29 Aug 2002
Posts: 54

PostPosted: Thu Nov 21, 2002 10:20 pm    Post subject: Reply with quote

theclaus wrote:
Okay I had this problem and someone on IRC helped me out. This is what he said to do.

[08:45] <vegai> TheClaus: try usermod -s /bin/bash user

When I did that it worked. Though while I was at it I also did a etc-update. After that I tried ssh as normal user and it worked great.


That was it. Not sure why it changed but that fixed it. Thanks.
_________________
Josh
Back to top
View user's profile Send private message
Dalrain
Tux's lil' helper
Tux's lil' helper


Joined: 02 Jul 2002
Posts: 136
Location: Wooster, OH USA

PostPosted: Fri Nov 22, 2002 1:32 am    Post subject: Reply with quote

This fix also did it for me....also, I don't know why it changed....all that could have happened was whatever occurred during the update..

Ah well, many thanks, my system is happy again :)
Back to top
View user's profile Send private message
mooman
Apprentice
Apprentice


Joined: 06 Nov 2002
Posts: 175
Location: Vancouver, WA

PostPosted: Fri Nov 22, 2002 2:07 am    Post subject: Reply with quote

If 3 different people had this, this ought to get published as an FAQ or Tip/Trick. (I'd say the former since it sounds more like fixing something broken than just handy advice...)
_________________
Linux user off and on since circa 1995
Back to top
View user's profile Send private message
nick58b
n00b
n00b


Joined: 09 Nov 2002
Posts: 30
Location: Santa Barbara, CA

PostPosted: Fri Nov 22, 2002 9:14 am    Post subject: Reply with quote

Make that four. I had this problem on both my gentoo boxes after the last emerge -u world.
Back to top
View user's profile Send private message
fleed
l33t
l33t


Joined: 28 Aug 2002
Posts: 756
Location: London

PostPosted: Fri Nov 22, 2002 4:40 pm    Post subject: Reply with quote

Count another one. Started having the problem only after last emerge -u world. Must be tighter security in something that was updated, maybe pam?
Back to top
View user's profile Send private message
ibrandt
n00b
n00b


Joined: 13 Sep 2002
Posts: 24

PostPosted: Fri Nov 22, 2002 9:26 pm    Post subject: Reply with quote

I got this too, and just updated baselayout as well, but it only effected one of the two user accounts I have setup. Thank goodness that was the case, because I have 'PermitRootLogin no' in sshd_config, and my box is co-located!
Back to top
View user's profile Send private message
rlyacht
Apprentice
Apprentice


Joined: 17 Apr 2002
Posts: 170

PostPosted: Sat Nov 23, 2002 6:42 pm    Post subject: Reply with quote

I just had this problem and the usermod -s /bin/bash user fix worked for me. can someone explain what happened?
_________________
It's spelled Raymond Luxury-Yacht, but it's pronounced Throat-Warbler Mangrove.
Back to top
View user's profile Send private message
Dalrain
Tux's lil' helper
Tux's lil' helper


Joined: 02 Jul 2002
Posts: 136
Location: Wooster, OH USA

PostPosted: Sat Nov 23, 2002 8:39 pm    Post subject: Reply with quote

Hmmm...just a thought, but did this happen to only the user you su'ed from to do your emerging as root? I have a habit of using su - to do my tasks, and the user I su'ed from would be the one that had this problem. Is this perhaps the same for others? Or am I totally just thinking incorrectly?
Back to top
View user's profile Send private message
ibrandt
n00b
n00b


Joined: 13 Sep 2002
Posts: 24

PostPosted: Sat Nov 23, 2002 10:24 pm    Post subject: Reply with quote

Dalrain wrote:
Hmmm...just a thought, but did this happen to only the user you su'ed from to do your emerging as root? I have a habit of using su - to do my tasks, and the user I su'ed from would be the one that had this problem. Is this perhaps the same for others? Or am I totally just thinking incorrectly?


Actually for me it was just the opposite, the user that I don't su to root from was the one that got locked out. The user in question is not a member of the wheel group, just users.
Back to top
View user's profile Send private message
rac
Bodhisattva
Bodhisattva


Joined: 30 May 2002
Posts: 6553
Location: Japanifornia

PostPosted: Sun Nov 24, 2002 12:37 am    Post subject: Reply with quote

For people who got fixed by running "usermod -s /bin/bash", I suspect that you had created users with no login shell.
_________________
For every higher wall, there is a taller ladder
Back to top
View user's profile Send private message
clattuc
n00b
n00b


Joined: 19 Apr 2002
Posts: 57

PostPosted: Mon Nov 25, 2002 5:13 pm    Post subject: Reply with quote

rac wrote:
For people who got fixed by running "usermod -s /bin/bash", I suspect that you had created users with no login shell.


Well, at least in my case, that wasn't it. Shells were already specified (as /bin/bash), but re-specifying them with the usermod thingie fixed the problem... weirdness ... :roll:
Back to top
View user's profile Send private message
Parabola
n00b
n00b


Joined: 29 Aug 2002
Posts: 54

PostPosted: Mon Nov 25, 2002 5:31 pm    Post subject: Reply with quote

rac wrote:
For people who got fixed by running "usermod -s /bin/bash", I suspect that you had created users with no login shell.
Yeah my account looks to have had no shell specified when I created it, but why would it work before?
_________________
Josh
Back to top
View user's profile Send private message
yottabit
Guru
Guru


Joined: 11 Nov 2002
Posts: 313
Location: Columbus, Ohio, US

PostPosted: Tue Nov 26, 2002 10:01 pm    Post subject: Reply with quote

Yes, the listed command will simply add a "/bin/bash" shell selection to the user definition in the "/etc/passwd" file.

I noticed the same thing, but instead of using the command as stated, I just manually edited /etc/passwd with "nano -w /etc/passwd" and tagged on a "/bin/bash" to the end of the user with the problem.

I can't believe I would have created this user without a shell definition in the first place, but anything is possible, and I have no reason to believe that the user had ever logged in via ssh before...

If sshd was authenticating users without shells, that's a security bug. So the fact that it has been fixed with the latest round of updates is a Good Thing (tm).

Cheers,

J
Back to top
View user's profile Send private message
doll1
Tux's lil' helper
Tux's lil' helper


Joined: 12 Nov 2002
Posts: 120
Location: Düsseldorf, Earth

PostPosted: Wed Dec 04, 2002 1:05 pm    Post subject: Reply with quote

Helpful thread :)
Back to top
View user's profile Send private message
gtsquirrel
Tux's lil' helper
Tux's lil' helper


Joined: 21 Nov 2002
Posts: 85
Location: San Jose, CA

PostPosted: Thu Dec 05, 2002 5:55 pm    Post subject: VERY Helpful Reply with quote

This was a very helpful thread. I guess we're all used to distros that auto-set the shell to some default. Thanks a lot for the help, everyone!

chris
Back to top
View user's profile Send private message
Ti_Uhl
n00b
n00b


Joined: 28 Nov 2002
Posts: 6
Location: Belgium

PostPosted: Fri Dec 06, 2002 2:29 pm    Post subject: PAM Has changed Reply with quote

Hello,

If u look at your pam config for ssh login u can see that in order for a user to log in it needs to have a valid shell. This is for security reasons... so either add a valid shell to the /etc/passwd or change your pam config


Greetz Ti_Uhl

Code:

#%PAM-1.0
auth       required   pam_stack.so service=system-auth
auth       required     pam_shells.so
auth      required   pam_nologin.so # needs a valid shell !!!
account    required   pam_stack.so service=system-auth
password   required   pam_stack.so service=system-auth
session      required   pam_stack.so service=system-auth
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum