View previous topic :: View next topic |
Author |
Message |
Parabola n00b

Joined: 29 Aug 2002 Posts: 54
|
Posted: Thu Nov 21, 2002 4:08 pm Post subject: Can no longer ssh into box as a normal user |
|
|
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 |
|
 |
rac Bodhisattva


Joined: 30 May 2002 Posts: 6553 Location: Japanifornia
|
Posted: Thu Nov 21, 2002 4:54 pm Post subject: |
|
|
You didn't happen to overwrite your /etc/passwd, did you? _________________ For every higher wall, there is a taller ladder |
|
Back to top |
|
 |
Parabola n00b

Joined: 29 Aug 2002 Posts: 54
|
Posted: Thu Nov 21, 2002 5:22 pm Post subject: |
|
|
Nope, it still looks good. _________________ Josh |
|
Back to top |
|
 |
Dalrain Tux's lil' helper

Joined: 02 Jul 2002 Posts: 136 Location: Wooster, OH USA
|
Posted: Thu Nov 21, 2002 7:09 pm Post subject: |
|
|
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 |
|
 |
Dalrain Tux's lil' helper

Joined: 02 Jul 2002 Posts: 136 Location: Wooster, OH USA
|
Posted: Thu Nov 21, 2002 7:15 pm Post subject: |
|
|
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 |
|
 |
rac Bodhisattva


Joined: 30 May 2002 Posts: 6553 Location: Japanifornia
|
Posted: Thu Nov 21, 2002 7:18 pm Post subject: |
|
|
Does running ssh with the -v flag give any useful hints? _________________ For every higher wall, there is a taller ladder |
|
Back to top |
|
 |
theclaus n00b


Joined: 08 Oct 2002 Posts: 64 Location: Boise, ID
|
Posted: Thu Nov 21, 2002 8:41 pm Post subject: |
|
|
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 |
|
 |
Parabola n00b

Joined: 29 Aug 2002 Posts: 54
|
Posted: Thu Nov 21, 2002 10:20 pm Post subject: |
|
|
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 |
|
 |
Dalrain Tux's lil' helper

Joined: 02 Jul 2002 Posts: 136 Location: Wooster, OH USA
|
Posted: Fri Nov 22, 2002 1:32 am Post subject: |
|
|
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 |
|
 |
mooman Apprentice


Joined: 06 Nov 2002 Posts: 175 Location: Vancouver, WA
|
Posted: Fri Nov 22, 2002 2:07 am Post subject: |
|
|
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 |
|
 |
nick58b n00b


Joined: 09 Nov 2002 Posts: 30 Location: Santa Barbara, CA
|
Posted: Fri Nov 22, 2002 9:14 am Post subject: |
|
|
Make that four. I had this problem on both my gentoo boxes after the last emerge -u world. |
|
Back to top |
|
 |
fleed l33t


Joined: 28 Aug 2002 Posts: 756 Location: London
|
Posted: Fri Nov 22, 2002 4:40 pm Post subject: |
|
|
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 |
|
 |
ibrandt n00b

Joined: 13 Sep 2002 Posts: 24
|
Posted: Fri Nov 22, 2002 9:26 pm Post subject: |
|
|
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 |
|
 |
rlyacht Apprentice


Joined: 17 Apr 2002 Posts: 170
|
Posted: Sat Nov 23, 2002 6:42 pm Post subject: |
|
|
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 |
|
 |
Dalrain Tux's lil' helper

Joined: 02 Jul 2002 Posts: 136 Location: Wooster, OH USA
|
Posted: Sat Nov 23, 2002 8:39 pm Post subject: |
|
|
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 |
|
 |
ibrandt n00b

Joined: 13 Sep 2002 Posts: 24
|
Posted: Sat Nov 23, 2002 10:24 pm Post subject: |
|
|
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 |
|
 |
rac Bodhisattva


Joined: 30 May 2002 Posts: 6553 Location: Japanifornia
|
Posted: Sun Nov 24, 2002 12:37 am Post subject: |
|
|
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 |
|
 |
clattuc n00b

Joined: 19 Apr 2002 Posts: 57
|
Posted: Mon Nov 25, 2002 5:13 pm Post subject: |
|
|
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 ...  |
|
Back to top |
|
 |
Parabola n00b

Joined: 29 Aug 2002 Posts: 54
|
Posted: Mon Nov 25, 2002 5:31 pm Post subject: |
|
|
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 |
|
 |
yottabit Guru


Joined: 11 Nov 2002 Posts: 313 Location: Columbus, Ohio, US
|
Posted: Tue Nov 26, 2002 10:01 pm Post subject: |
|
|
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 |
|
 |
doll1 Tux's lil' helper


Joined: 12 Nov 2002 Posts: 120 Location: Düsseldorf, Earth
|
Posted: Wed Dec 04, 2002 1:05 pm Post subject: |
|
|
Helpful thread  |
|
Back to top |
|
 |
gtsquirrel Tux's lil' helper


Joined: 21 Nov 2002 Posts: 85 Location: San Jose, CA
|
Posted: Thu Dec 05, 2002 5:55 pm Post subject: VERY Helpful |
|
|
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 |
|
 |
Ti_Uhl n00b

Joined: 28 Nov 2002 Posts: 6 Location: Belgium
|
Posted: Fri Dec 06, 2002 2:29 pm Post subject: PAM Has changed |
|
|
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 |
|
 |
|