While updating my gentoo linux box, I managed to mess up PAM. Now I can't login!
Here's the message I get
login: <I type my name, enter>
/bin/login: error while loading shared libraries:
libpam_misc.so.0: cannot open shared object file:
No such file or directory
login: <repeat>
I think I need to boot in single user mode but how do I do that?
Don't worry about PAM--I'll figure that out once I can get some control of the system. If I need to use a live cd, I'll have to wait until tomorrow as I don't have any handy.
Update: I tried adding to grub's kernel line
init=/bin/sh real_init=/bin/sh
and that helped. Now I get dumped to a shell pretty much right away. The problem now is that my keyboard doesn't work! It's USB...
Update: Adding these to the kernel line also don't work:
init=/bin/bash real_init=/bin/bash (no keyboard)
init=/bin/bb real_init=/bin/bb (kernel panic)
single (no change--original problem persists)
If you are using GRUB as a boot manager, stop the boot at the boot menu. Highlight the kernel you boot into and hit the 'e' key to edit the line. Add the option "single" at the end of the line and it will boot into single user mode.
If that fails, boot into a LiveCD and use that environment to mount your drive and fix the necessary files you need in order to fix PAM
I'd go for the rescue / live CD? >smile< W/ your keyboard problem, that may be easier. If you've got a thumb drive on you, go grab one of the various thumb-drive Linux distros, write it to the thumb drive, and you'll be back in business.
If single user mode doesn't work, you can always try booting with /bin/bash as init. Boot into grub, press e, and edit the boot line to have init=/bin/bash. You'll boot into a system with nothing else running, and will have to manually remount filesystems, so it's better to go for single user mode if possible.