Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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!

share|improve this question

1 Answer 1

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.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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