0

I wished to change my username. To acheive this, I made the unfortunate choice to simply edit "/etc/passwd", replacing the respective username.

Now I cannot log in anymore as that user. I assume this happens because I didn't also replace the name inside "/etc/shadow"?

The real question is: is there any way to recover the user account/user data?

1 Answers1

1

When you boot your computer, press shift when the BIOS is done.

You should end up in the grub boot menu, if now try again. There you choose advanced options for UBUNTU, and then your your actual kernel in recovery mode.

You should end up in a menu where you can choose to be root and end up in a shell as such. Now remount your drive into read/write access.

mount -rw -o remount /

from there reverse your changes you made and reboot by

reboot

Read more here ...

Videonauth
  • 33,355
  • 17
  • 105
  • 120