[ubuntu-uk] backup home folder
Alan Lord (News)
alanslists at gmail.com
Fri Sep 17 14:18:34 BST 2010
On 17/09/10 13:35, alan c wrote:
> On 16/09/10 09:57, Alan Lord (News) wrote:
>> One gotcha that you should be aware of when using a fresh operating
>> system install is that usernames and groups in linux are actually really
>> numbers (UID and GID) and the name is mapped to the UID in /etc/passwd.
<snip />
> To help me be more clear on this:
> Am I correct in understanding that as long as the original
> /home/username
> is copied or backed up while being signed on as first user, then the
> subsequent paste into the new install will be ok?
Hi Alan,
How does this work?
When every user is created on a linux system they are assigned a UID
number (and usually a GID of the same). These tend to happen
sequentially so the first user (the one you create when installing
Ubuntu) will get UID 1000. The next 1001 etc etc - there *may* be gaps
as some applications might create users when they get installed.
Although looking at my /etc/passwd it looks as though Ubuntu uses UIDs <
1000 for applications.
So:
/home/user1 will be stored on the file system with UID/GID of 1000.
/home/user2 1001
/home/user3 1002 etc etc,
It isn't a *major* headache of the UIDs from one system to the next
don't match when moving a backup, you just have to be aware of this and
change as necessary: either use:
sudo vipw
to edit /etc/password and change the user's UID/GID to the right ones, or:
sudo chown newuser: -R /home/newuser
I'd be a little more careful with this one in case there are any system
files/hidden files stored in your home dir. I don't think there should
be but I'm sure a quick search/find could tell you.
HTH
Al
--
The Open Learning Centre
http://www.theopenlearningcentre.com
More information about the ubuntu-uk
mailing list