15

I deleted two unused user accounts. Now I am unable to login even into my own account. I rebooted in recovery mode in the root shell and tried to restore the back-up of /etc/passwd. However, the filesystem is read-only!

I can only access root shell via recovery.

Can you help me?

3
  • @Jobin There is an existing bug for this. You may want to add your vote (the green writing near the top-left of the bug page). Feb 12, 2013 at 16:59
  • Thanks @PaddyLandau. Thought it was a security measure rather than a bug. Marked it as it affects me too :)
    – jobin
    Feb 12, 2013 at 17:06
  • Well, it used to work until (I think) 11.10. Feb 12, 2013 at 21:19

2 Answers 2

37

If I am not wrong, the filesystem is mounted read-only by default in Recovery mode. To mount it as read-write, go the recovery mode and choose root. Now type the following command:

mount -o rw,remount /

Note the spaces, you'll get an error if you ignore the spaces, or add extra ones too. And then you can copy as you tried earlier.

3
  • If your home is on an extra partition, you may also need the command mount --all. Feb 12, 2013 at 21:20
  • Any tips for "mount: special device remount does not exist"?
    – user319862
    Apr 16, 2017 at 0:11
  • Figured it out. Enabling network sets filesystem to read/write
    – user319862
    Apr 16, 2017 at 0:19
0

Recently on my Ubuntu 16.04 LTS, I encountered error "System is running in low-graphics mode" and there is no way you can login or proceed beyond this error screen.

For me this happened when I renamed /usr/share/X11/xorg.conf.d directory while I was trying to solve one of the graphics related problems.

Workaround:

On the error window, press ctrl+alt+f3 to get to the console. Here the filesystem is mounted but in read-only mode so you can't edit to rename the directory back for correction.

To mount the filesystem in read-write mode, use following command

Command: mount -o rw,remount /

It would mount the filesystem in read-write mode. Now you can correct the name of the directory using mv command. Then, use exit command and Press Alt + multiple times till you get to the UI again.

If required, reboot the system using reboot command, now you should be able to login as usual.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .