Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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

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


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.