PDA

View Full Version : [ubuntu] 9.10 install question with existing /home folder



3pinner
December 31st, 2009, 08:53 PM
Hello,
I am getting ready to do a clean install of 9.10
I am currently running 8.10
I have my HDD divided into the following partitions: / /swap /home
The /home partition has three accounts on it.
I have backed up my/home partition.

The last time I did this (installing 8.10) I could not access my /home partition. I was able to solve the problem by creating a user without a /home folder location, then changing the permissions so I could access the existing account.

My question is: when I do the clean install of 9.10, what do I do during the install so that all the permissions etc are applied so that I can access my /home partition?
Do I create another /home partition, or just / and /swap?

Thanks!

raymondh
December 31st, 2009, 09:11 PM
Hello,
I am getting ready to do a clean install of 9.10
I am currently running 8.10
I have my HDD divided into the following partitions: / /swap /home
The /home partition has three accounts on it.
I have backed up my/home partition.

The last time I did this (installing 8.10) I could not access my /home partition. I was able to solve the problem by creating a user without a /home folder location, then changing the permissions so I could access the existing account.

My question is: when I do the clean install of 9.10, what do I do during the install so that all the permissions etc are applied so that I can access my /home partition?
Do I create another /home partition, or just / and /swap?

Thanks!

Use the same username and password when installing 9.10 root (/) and mounting /home to it. That usually solves the permission problem.

Of course, back-up your files ....

3pinner
January 1st, 2010, 12:14 AM
Use the same username and password when installing 9.10 root (/) and mounting /home to it. That usually solves the permission problem.

Of course, back-up your files ....

thank you!
So if I do that and mount /home to it, that will preserve permissions for all users in the /home partition?

What commands if any do I type into terminal to mount the existing /home to the new root / ?

J V
January 1st, 2010, 12:19 AM
All users? Their data will probably remain... Then you just remake their accounts...

My question is: Will this cause software bloat between different application versions?

raymondh
January 1st, 2010, 12:34 AM
thank you!
So if I do that and mount /home to it, that will preserve permissions for all users in the /home partition?

Your username/password is what allows access to the /home directory. By using the same, you are maintaining the same permissions. I believe/think that goes as well for those users' whose files and settings are within /home ... (sorry, I've never had multiple users in my systems).

What commands if any do I type into terminal to mount the existing /home to the new root / ?

You can do it from the install process. As you know, you mount (by selecting from the drop-down) and format root. For /home, you mount it but DO NOT FORMAT.



Regards,

3pinner
January 1st, 2010, 12:56 AM
Regards,

Thats what I did last time. Mounted it but did not format.
I used the same username and password for my root account, and could access that after the install, but could not access any of the other accounts.
I had to create the account and use the following to get access their folders on the /home partition:(anyname is one of the accounts in /home)

sudo adduser --no-create-home anyname
sudo chown -R anyname:anyname
sudo chmod 755 /home
sudo chmod 770 /home/anyname

I was just hoping there was some way during the install to avoid having to do this.

indigo42
June 1st, 2010, 03:03 AM
One thing to note is this. Linux doesn't care about the user name, it's the user ID number it's after. All this stuff is set in your /etc/passd file as shown in the horribly color coded example below.

foo:x:1000:1000:foo:/home/foo:/bin/bash

foo username
x password link (shadow passwords...don't ask!)
1000 user ID#
1000 group ID#
foo Display or full name
/home/foo home directory
/bin/bash shell used for this account

Make a backup of your /etc/passwd file somewhere. When your install creates a new one, you can enter your users in it using vi or kate, or whatever.

You may also have to make sure your /etc/group file matches your old one too.

foo:x:1000: <-See? The user foo is in a group called 'foo' with guid of 1000

The reason why your user account worked with your old home is that the first user is always UID 1000 and group ID 1000

Hope this helps! It not so bad once you see how simple it is to add and remove users the old fashioned way.