0

I was trying to move my home folder to another account so hopefully my programs would have run faster on a new user. But apparently that did not work out well and I can not login to either accounts.

My original account is Cheyanne so I typed in terminal

sudo mv /home/Cheyanne /home/blanket

then when I got on blanket it ended up being wrong and so I typed

sudo mv /home/blanket /home/Cheyanne

not realizing that it was actually transferring blanket to Cheyanne and Cheyanne to blanket.

I have no idea how I can get them back, I am possible I didn't do too much damage and I have things I really need back so it would be appreciated to have some help.

1 Answer 1

0

Switch on your computer.

Press and hold the Shift key, which will bring up the Grub menu.

Select the line which starts with Advanced options.

Select the line ending with recovery mode.

Your PC should display a menu with a number of options.

Select the line ending with Drop to root shell prompt

In the terminal enter the commands

# mount -o remount,rw /
# mount --all
# adduser blanket 

Ubuntu will prompt you for more information about the user you are creating.

The first piece of information you need to choose is the password for the new user.

It will ask you to select a password and then confirm it by repeating it.

Afterwards, it will ask you for personal information about the user.

The user you created will be your primary user on the system, you must to enable sudo privileges so that you can do routine configuration and maintenance, continue running:

# visudo

Find the part of the file that is labeled User privilege specification. It should look something like this:

# User privilege specification
root    ALL=(ALL:ALL) ALL

We give a user sudo privileges by copying the line beginning with "root" and pasting it after.

We then change the user "root" on the new line to our new user, like this:

# User privilege specification
root        ALL=(ALL:ALL) ALL
blanket     ALL=(ALL:ALL) ALL

We can now save the file and close it.

By default, you can do that by typing:

Ctrl + X, then typing Y, and pressing Enter.

Restart the computer with the new user blanket and carefully copy your application settings you want from the old user Cheyanne.

Note:

For another chance, remember that to change the user name and its folder is required to login as root and use the command usermod

Open a terminal,

Press Ctrl+Alt+T

Run it:

$ sudo -i

This will change only the user's login name.

# usermod -l newname oldname

This will change the real name of the username.

# usermod -c "New-Real-Name" username

This will only change the home directory of username. You do not need to manually create the new directory.

# usermod -d /home/new-home username

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .