PDA

View Full Version : [SOLVED] Add user: home directory already exists



joshedmonds
May 7th, 2008, 10:24 AM
A user that I had setup in 7.10 has been transferred to 8.04, but I can't log them in with their old password. When I go to users and groups, they don't appear in the list, and I can't add them because their home folder still exists. Any help appreciated.

mjwhitfield
May 7th, 2008, 10:25 AM
rename the home directories, create the users then copy the data back into the new folders.

SupaSonic
May 7th, 2008, 10:27 AM
After that, run

sudo chown -R your_username /home/your_username
so that the new user would be the owner of the files, if he isn't already.

joshedmonds
May 7th, 2008, 10:37 AM
I'm not able to edit the folder names using the gui, what would be the appropriate cli commands?

SupaSonic
May 7th, 2008, 10:44 AM
Say your username is user

sudo mv /home/user /home/user2

Create a user called 'user' (not sure how it is from the terminal, so use GUI)


sudo mv /home/user2 /home/user
sudo chown -R user /home/user

Log out and login as a user

joshedmonds
May 7th, 2008, 11:01 AM
Thanks for that. I did a

gksudo nautilus
to rename the folders, created the users, renamed the folders again, and changed permissions with

sudo chown -R user_name /home/user_name
and it worked perfectly.