with wrong pam_environment unable to login

Asked by tigerswing2 on 2012-06-28

Hi,

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.

tiger

Question information

Language:
English Edit question
Status:
Answered
For:
Ubuntu pam Edit question
Assignee:
No assignee Edit question
Last query:
2012-06-28
Last reply:
2012-06-29

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:

reboot

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.