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?
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: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.
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, useexit
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.