Changing username

So I wanted to change my username and… I miserably failed…

I started to follow the steps here

So I edited /etc/passwd replacing my username by the new one:

nano /etc/passwd

Except that now I can’t use my own password (and can’t use sudo)… is there a way to fix what I just did?

Hi @kerry.perret, and welcome!

I’m not going to be the one to say it, but you shouldn’t have done that! :stuck_out_tongue: :grin:

I’m guessing, if you can remember what files you edited, you can edit them again, this time from a live ISO environment back to what they were.

Alternatively, you could from the said live ISO environment, enter a chroot environment, and create a new user for you yo use.

Alternatively, you can just reinstall.

Why didn’t you look at the wiki article?

You would’ve seen this:

1 Like

Well I actually read this bit… except that it was too late when I did…

This is what I ended up doing up doing ~~ things are back to normal now :sweat_smile:

I’m very glad to hear that! I’m also glad my advice worked. Now, what have you learned from this exercise?