with wrong pam_environment unable to login

Asked by tigerswing2 on 2012-06-28


I made some mistakes in ~/.pam_environment file, the wrong changes caused the login failure. I could not login in system. I only have one super account. And I tried to press ctrl-alt-f1 to enter into full screen login mode, however I still couldn't login.

Can any body help?

Many thanks.


Question information

English Edit question
Ubuntu pam Edit question
No assignee Edit question
Last query:
Last reply:

If you hold SHIFT at boot, select recovery mode then select root you can then edit the file in cli with:

nano /home/foo/.pam_environment

obviously change foo for your actual username. Eg:

nano /home/andy/.pam_environment

You can save the changes and exit nano by pressing CTRL+X, then press Y follolwed by ENTER. You can then run:


and attempt to log in again.

tigerswing2 (tigerswim2) said : #2

thanks for you replay.

I have tried your solution, however it prompted me "read-only file system" when I tried to save the changes in the file. Any more suggestions?

Sounds like an inconsistent file system. Boot to the live CD and fsck the partition

Can you help with this problem?

Provide an answer of your own, or ask tigerswing2 for more information if necessary.

To post a message you must log in.