1

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.

A.B.
  • 92,125
Olymbia
  • 11

1 Answers1

6

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.

/home/new_name/old_name

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
Fabby
  • 35,017
A.B.
  • 92,125