I made some mistakes in my ~/.pam_environment file; the changes caused a login failure.

I cannot log in to my system. I only have one super account. I tried to press ctrl-alt-f1 to enter into full screen login mode, however I still couldn't login.

Can anybody help?

  • Do you know exactly what changes you made? Was it to only this file? – belacqua Jun 28 '12 at 13:58

You could try booting into “single user mode” or “recovery mode” in order to fix your problem. As I'm not Using vanilla Ubuntu installations that often, I'm not sure how the latest version of the recovery mode looks like, whether its shell option will ask you for a password, and if it does, whether that passwort check uses pam. So you'll have to give it a try.

If that doesn't work, as a last resort you could append init=/bin/bash to your boot command line in grub. That will dump you into a shell very early during boot, so many services will not be available, but it won't display a login prompt either, so it should enable you to fix your pam setup unless that is on a partition which isn't mounted by that time. You'll probably have to remount your root fs writable before doing any changes: mount / -o remount,rw.

  • Booting from a liveCD and repairing manually is also an option, if recovery mode doesn't work. Mounting should be done as in this answer. – belacqua Jun 28 '12 at 13:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.