Ubuntu won't let me set new users to existing user Home folders?

Asked by george_rutkay

I've been using 8.04 for a while now.

I tried to use 8.10, having received it in the mail on CD. But I found that the graphics driver on it was not working with my machine properly at all. Time well wasted I suppose, not that I have time to waste.....but anyway I reinstalled 8.04 back onto the / partition so my wife could get back to using the machine for practical stuff.

About the set up:
100 gig drive, partitioned into 3 slices.
Partition 1 = / (15 gig, this one contains the operating system)
Partition 2 = /home (83 gig divided among 4 users - me +3 kids - no operating system)
Partition 3 = swap (2 gig because I have 2 gig of Ram in this thing)

All of the users home directories are on Partition 2. I can access my /home folder just fine. I can also login as root and access Partition 1 just fine.

When I reinstalled 8.04, I formatted Partition 1. But I left the other partitions alone, just specified their appropriate mount point and file system (ext3).

This is what I tried to do now and bitterly failed due to an illogical error message:

I go to System/Administration/Users and Groups and try to add the kids accounts back to the login list (I'm using the Login screen "Avio-GDM-0.9.2.tar.gz"). But Ubuntu will not allow me to set the kid's accounts back to where they currently are on the hard drive. I get the error message:

"Home director already exists. Please enter a different home directory path"

Fact about this system:
There is no other correct path than what is default (/home/"kid's name here"). The path is correct, it's the same path, the same hard drive as it was before. But the Users and Groups window refuses to allow it's entry.

I don't want the computer to reject already well-used and valid set of user Home directories, especially when there are so many songs, videos, pictures, etc... in the kid's accounts. It makes no sense.

Why is it wasting my time when the directories are already there from previously? It can't be a matter of lapsed time since the time lapsed from:

-the installation of 8.10, it's subsequent failure to work with my graphics card properly
-attempt to locate (and fail to find a solution to this problem in a sensible amount of time)
-the removal of 8.10 and reinstallation of 8.04

......the total elapsed time was at most about 3 hours.

Something is very wrong to cause the system to believe there is any other /home path, especially when it already accepts and lets me use (even as I type this) my SAME OLD /home directory on Partition 2! What gives?

Thanks,
geo

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Solved by:
george_rutkay
Solved:
Last query:
Last reply:
Revision history for this message
Matthias Niess (mniess) said :
#1

In the terminal you can try:
sudo adduser --home /home/kid1 --no-create-home kid1

I haven't tried this, but it should work. If not you can always just rename the kid1 dir, create the user and copy the stuff over.

Revision history for this message
george_rutkay (yaktur) said :
#2

When I tried:

sudo adduser --home /home/kid1 --no-create-home kid1

I got the brilliant response that the accounts already exist (yet the names do not appear in the login window).

The second suggestion is the only one that worked. The bells and whistles which the kids had done to personalize their accounts is all gone now but at least their songs, pictures and movies are still intact and they can log back in again.

Revision history for this message
Jim Hutchinson (jphutch) said :
#3

George,

I'm not entirely sure about the why but this is normal. It is simply seeing a conflict and letting you know you can't do that. I think there is a way to tell it to recreate a user and use an existing home directory; however, when I had a similar problem I gave up and did it a different way. Basically, I changed the path of the "old" user. For example:

/home/kid1

to

/home/kid1old

Then I created the "new" user "kid1" and copied all the files from kid1old back to kid1. You will lose settings and such but the important ones like firefox bookmarks can also be copied back easily.

Sorry I don't know the real answer.

Revision history for this message
Jim Hutchinson (jphutch) said :
#4

Hmmm, just found this.

http://linux.about.com/od/commands/l/blcmdl8_adduser.htm

It looks like the -d option might let you use an existing directory.

I created a dir called /home/test and then tried to add a new user called "test" from the user and group tool on the admin menu. It gave me the same error about the dir existing. Then I used

sudo useradd -d /home/test test

And the user was created. I don't think it got a password and such but you can add that afterward.

Revision history for this message
george_rutkay (yaktur) said :
#5

Hmm, thanks!