This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

OT?: tar --same-owner -xpf z.tar #"does rgt thing" in newdomain


<end user tip>
We're migrating servers to a new AD domain.  The usernames are unchanged,
ie user accounts are duplicated in both domains, for the transition.

If foo.tar was created in domain "OLD", and as an admin, you run:

  tar --same-owner -xpf foo.tar  # in domain "NEW"

Then files and dirs are written out with ownership, and posix groups
mapped as one would hope - to the matching accounts and groups in
the new domain. Very nice!

--
thanks,
Tom Rodman

--
PS

A couple of days ago, after re-reading the tar info pages, I decided to
try the --same-owner switch , and was pleasantly surprised. Not sure if
it's commonly known that the --same-owner switch is needed even if your
an administrator. I had assumed "-xpf" was all that would be needed to
restore owners (like UNIX); when that did not work I "accepted" that
cygwin's tar did not restore ownership.

--
caveat:
  We're planning to setup SID history in the new domain, but to 
  my knowledge it is not in place now, so I think tar is looking
  up the SIDs in /etc/{password,group} using the names in the tar archive -
  ie I don't think I'm being fooled ;->

  Another side issue - initial tests in a separate "test domain", suggest
  that (as Corinna expected) cygwin does not understand SID history -
  I'm *not* saying it should.

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]