Jump to content

login: no shell: Permission denied


Urza9814
 Share

Recommended Posts

Ok, I was on my comp, and everything was fine...and suddenly the internet connection died. So I get on the other computer...works fine there...it's happened before, I figure I'll just try a reboot. So I fire up konsole...it won't open. Well, I already have a window open on my other desktop, so I hit 'su'...and get an error saying permission denied to /bin/su. Soo, being a long time windoze user, I close everything, hit the reset button, and pray. My prayers were denied. It boots up, and I get the CLI login prompt, which is already a bad sign. I type in my user name, put in my password, it flashes an error message and clears the screen and asks for my login again. I type in root, put in my root password, and it says 'Login incorrect' . So, now I'm freaking out...so I take out my camera and record myself keying in my username and password...and through the magic of Windows Media Player (it allows slowing down video), find that the error message it flashes before clearing the screen is 'login: no shell: Permission denied'.

I can still login to root through the failsafe option, but I don't know what to do from there. Anyone have any idea what the heck is going on, or am I gonna be stuck doing a reinstall?

The only thing I can think of that may have caused this was my install of Xen...and that was about 2 hours before I started having any problems. But after that I wasn't logged into root at all, and all I was doing it running freenet, gaim, firefox, and amarok...which is what I do every day with no problems. And no, none of those were running as root.

Edited by Urza9814
Link to comment
Share on other sites

Boot in failsafe, or even from a rescue cd. Look at /etc/passwd and find your username in here. Easy way is:

 

cat /etc/passwd | grep username

 

The most important bit is the end of the line, which is your shell. It should normally say /bin/bash. Here is mine as an example:

 

[ian@europa ~]$ cat /etc/passwd | grep ian
ian:x:500:500:Ian Walker:/home/ian:/bin/bash

 

If you just look at /etc/passwd without filtering, you'll see some shells like /bin/false, or others, so that the user can't login. Now, to change it back:

 

usermod -s /bin/bash username

 

and replace username accordingly. Never attempt to edit this file. It works with shadow passwords as well, and you can really screw things up editing this. Trust me, I've done it, but I did manage to recover. Anyway, you may wish to do this next:

 

passwd username

 

to reset your password. Then do the same for root with:

 

passwd

 

and reboot and see how things are. To me though, sounds like you got hacked somehow maybe although I could be wrong and it's a genuine error. Have you got ssh running on your system without firewall? If so, check your logs to see if anyone connected.

Link to comment
Share on other sites

But see...I know at least with root the problem isn't the password, because I can login in failsafe fine....

But I'll look at that stuff later...don't have time at the moment.

Link to comment
Share on other sites

Well, I checked that file, it showed:

urza9814:x:500:500:  :/home/urza9814:/bin/bash

so looks like it was fine. So I tried running the installer again, just telling it not to format anything, and it ran fine, but when it got to installing the bootloader, I got the following message:

mkinitrd failed:
(mkinitrd -v -f /boot/initrd-2.6.11.12-xenU.img --ifneeded 2.6.11.12-xenU)).

So I'm guessing Xen was the source of the problems. However, the installer got far enough that I can now boot fine, though my internet connection is there but not connecting...but I think I just need to re-configure it...which I'll do once I figure out what driver I need to use for it again.

Other problem though is that Windoze no longer boots. I hit 'Windows' on lilo and it brings up a blank screen that says 'sfh>' and I tried typing stuff or something, nothing happened, it just drops back to lilo.

 

edit:

well, all it took to fix my internet was an 'ndiswrapper -m'...

Anyone got any ideas on my bootloader?

I hate bootloaders....

Might have to run the repair from the WinXP CD....but that can wait until I actually need XP. lol

Edited by Urza9814
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...