delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2006/04/29/01:00:09

X-Spam-Check-By: sourceware.org
Message-Id: <200604290459.k3T4xfUk010125@tigris.pounder.sol.net>
To: cygwin AT cygwin DOT com
From: cygwin AT trodman DOT com (Tom Rodman)
Reply-to: cygwin AT cygwin DOT com
Subject: OT?: tar --same-owner -xpf z.tar #"does rgt thing" in newdomain
Date: Fri, 28 Apr 2006 23:59:41 -0500
X-IsSubscribed: yes
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com

<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/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019