Re: Transfer home directory to another box



On Jul 3, 6:59 am, Barnacle Bill the Sailor
<mungedandmang...@xxxxxxxxxxxxx> wrote:
So I have got a new box built, and I am going to put Suse on it like I
have on my current one. Based on some positive comments here I will try
the 64 bit version. What I'd like to know is how can I copy the contents
of my present home directory to the new box, and not have to adjust the
permissions file by file. The last time I moved files around from box to
box, file ownership became a mess. Indeed I still have some files on my
present box that I can't edit without first going in as root and
changing the permissions. Since there are so many I do them one at at
time as I need to edit them. But of those that are already assigned to
me, I'd like to to migrate them to the new box in such a way that the
new box recognizes them as belonging to the new me thereon. (I will
assign myself the same user name, not that that means anything to two
different Linux installs.) Thanks!

ok, the first thing that matters is the user number (not the name).
If you look at your entry in /etc/passwd, this is the first of the two
numeric fields. The second numeric field is the group but I am not
expecting that to be a problem.

How are you expecting to physically copy the files over?
- network (nfs or Samba)
- attaching the old disc to the new machine
- CD-Rom or similar.

I'd clean up ownership first with houghi's chown -R user:group /
home/username

With a network, I am not sure if Samba gets the ownerships and the
permissions right. The smb protocols were designed for Windows which
does not have this stuff. Samba has extensions nowadays to handle
unix extras but I am not sure how far they go.
nfs should work. I'd copy the entire /home tree to the destination
(as root). This also applies if you attach the old disc to the new
system (or new disc to old system - get it right from the start!)

I believe you lose ownership / permissions if you use a CD. Can
someone post if this is wrong?

The way I copy entire trees is (as root):
- Mount the source and destination partitions (one will be /home, you
really need /home on the new system to be a partition)
cd /from_dir
tar cf - . | (cd /to_dir ; tar xf - )

Change the names 'from_dir' and 'to_dir' to fit.

If you do not have many local users, you might just as well create
them anew on the new system. Just make sure the numbers match.
Otherwise I agree with houghi - copy those 3 files.

.



Relevant Pages

  • Ownership of newly created objects?
    ... particular Samba share always ends up with a particular group ... - Directory 'contracts' inside the share, and ownership: ... - User 'joe' is has default group 'users', and is member of the group ... the ownership and permissions on the file that 'joe' created ...
    (comp.os.linux.networking)
  • Re: Understanding XP file permissions ? (Application Programs not following standards ?)
    ... > I've been trying to understand how file permissions in Windows NT/XP ... > Administrator account only for administrative purposes as it is ... > I also have a question about changing ownership of folders/files. ...
    (microsoft.public.windowsxp.security_admin)
  • Re: Adding XP in another partition users into Vi$ta
    ... not simply assign ownership to another (for auditing purposes ... When logged in as a standard user, when you elevate you are logging in ... be considered for deny permissions. ... I removed all accounts that could access folder X. ...
    (microsoft.public.windows.vista.security)
  • Re: Changing groups
    ... pleaderb, sue, frank, ed are members of group projectb ... Everyone is a member of group user. ... depending on the file's permissions they can read and write the ... I do this all the time, using Samba. ...
    (Debian-User)
  • Re: Device enumeration (was Re: CD writing in future Linux (stirring up a hornets nest))
    ... There's no ownership or permissions information in sysfs. ... the same interface two years from now given that the current interface ...
    (Linux-Kernel)