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?


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


Read more here ...

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.