X-Recipient: archive-cygwin AT delorie DOT com X-Spam-Check-By: sourceware.org Date: Wed, 3 Mar 2010 10:30:54 +0100 From: Corinna Vinschen To: cygwin AT cygwin DOT com Subject: Re: How to properly set up /etc/passwd and /etc/group Message-ID: <20100303093054.GG17293@calimero.vinschen.de> Reply-To: cygwin AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com References: <4B8B4B2E DOT 1040506 AT wesbarris DOT com> <4B8C1AF8 DOT 7010701 AT gmail DOT com> <4B8C48EE DOT 5040006 AT wesbarris DOT com> <4B8DB0C7 DOT 2000403 AT gmail DOT com> <4B8DAEAA DOT 8060605 AT wesbarris DOT com> <4B8DC9D4 DOT 9020400 AT gmail DOT com> <4B8DCA10 DOT 9010306 AT wesbarris DOT com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4B8DCA10.9010306@wesbarris.com> User-Agent: Mutt/1.5.20 (2009-06-14) Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com On Mar 3 12:31, Wes Barris wrote: > Dave Korn wrote: > >On 03/03/2010 00:34, Wes Barris wrote: > > > >>My W: drive is a mapped network drive. However, it is mapped to a > >>share coming from the same physical computer. This drive contains > >>all of my data including a folder that I wish to use as my home > >>directory (W: is mapped to //mycomputer/share/home). > > > > Just to check the obvious: is it mapped with the default (i.e., read-only!) > >permissions, or did you open it up? > > When I enabled sharing on that drive I checked the box that would > allow network users to modify the files. > > >>The contents of this drive was copied from my previous computer > >>on which I used the same username. > > > > Argh. Ouch. That's probably part of the problem. Using the same username > >on a different computer does *not* give your user account the same identity, > >when we're talking about local machine accounts rather than domain/workgroup > >accounts. > > > > How *exactly* did you copy "the contents of this drive" across? > > I put the two drives into the same computer and used Windows to > copy the contents from one drive to the other. This was done > in the new computer. I have also re-installed Windows on the > new computer. Does re-installing Windows change the machine > portion of the SID or is the SID tied to hardware? The machine SID is a random number chosen at installation time. It's not bound to the hardware. Only a Windows domain guarantees that you can use the same (domain) user SID on different machines. What you can do is to fetch the SID of your old account. It should be visible via the security dialog of a file. Let's assume it's S-1-5-21-11111-22222-33333-1004. Now add a matching dummy entry to /etc/passwd by hand, like this: dummy:*:123456:545:,S-1-5-21-11111-22222-33333-1004:: Now call ls -l and check that the SID is now recognized by Cygwin. If so, you can now call chown as administrator to convert the file ownership: find /cygdrive/w -user dummy -print0 | xargs -0 chown wes:users That's just off the top of my head, but it should basically work. Corinna -- Corinna Vinschen Please, send mails regarding Cygwin to Cygwin Project Co-Leader cygwin AT cygwin DOT com Red Hat -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple