0

I want to change my username and followed the instructions from How do I change my username? by creating a temp user with admin privileges. While logged in as temp, I did :

sudo usermod -l newname oldname
sudo usermod -d /home/newname -m newname

Now I cannot log in under newname and /home only lists newname and temp

Reading through other sites now, it seems I should have used

usermod -d /home/newname -m oldname 

Based on this, I think I may have deleted the contents of my previous home folder??

I'm sure I'm not the first person to do some stupid while changing username, but any help is greatly appreciated. Thank you!

0

Log in as temp again, open a terminal and type

sudo passwd newname

No, I don't think you have removed your old user, the -m option should move the home to newname.

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.