I wanted to change my username on my computer running Ubuntu 14.04. I tried sudo mv old name/ new name/ in home.

I restarted and now I cannot log in. I enter my password and nothing happens.
It is asking for the password again, without even any message like "invalid password" for example.

  • Your computer name or your user name? – A.B. Mar 27 '15 at 11:06
  • 3
    Firts, follow A.B.'s advice to restore the previous state of your system. Afterwards I would like to know, what you mean by “change my computer name”. “computer name” usually refers to the machine name (the part after the @ in the terminal prompt), but it looks like you may actually want to change your user account name. – David Foerster Mar 27 '15 at 11:07
  • 1
    Yes sorry my username – Olymbia Mar 29 '15 at 10:33

If you did that really the way you described it, then you have moved your home folder to new folder.

It would look like this.


The solution is to move the folder back.

Open a terminal or if that does not work Start the rescue mode in Grub.

  • Open a terminal

    • Ctrl+Alt+F1 (or Ctrl+Alt+F2 ...)
    • Continue with option 1 or option 2
  • Or Start the rescue mode in Grub.

    • Reboot your system
    • Repeatedly press Esc during boot
    • Select Ubuntu ... (recovery mode)
    • Select network necessary only for option 1
    • Select root
    • Continue with option 1 or option 2

Option 1 – the easy way

  • Install MidnightCommander (from the universe repositories) with:

    sudo apt-get install mc
  • Start with mc
  • Use the left panel for source /home/new_name and the right panel for target /home
  • Select all in the left panel with Ctrl+A
  • Move all from left to right with F6
  • Once finished, close the programm with Esc and then 0

Option 2

  • Move the folder back

For Option 1 and Option 2

  • If you're in rescue mode
    • Press Ctrl+C
    • restart your system
  • If you're not in rescue mode
    • Press Ctrl+D
    • Login in the GUI
  • If it's just a case of moved home folders, using the TTYs would be simpler than using the rescue mode (no options to pick, your login would work, etc.). – muru Mar 28 '15 at 0:17
  • He can't login! – A.B. Mar 28 '15 at 7:09
  • 3
    To the GUI. The TTY doesn't care for his home directory. – muru Mar 28 '15 at 11:29
  • @Olymbia Were you satisfied with my answer? Then give me a upvote (∧). If I could solve your problem, then it would be nice if you'd mark my answer (✓). – A.B. Apr 18 '15 at 14:41
  • I have no idea why but your comment just now popped up on my notifications. O.o – muru Apr 18 '15 at 14:42

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.