delorie.com/archives/browse.cgi | search |
X-Recipient: | archive-cygwin AT delorie DOT com |
X-SWARE-Spam-Status: | No, hits=-2.2 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS |
X-Spam-Check-By: | sourceware.org |
Message-ID: | <4B96F173.1020400@csiro.au> |
Date: | Wed, 10 Mar 2010 11:10:11 +1000 |
From: | Wes Barris <wes DOT barris AT csiro DOT au> |
User-Agent: | Thunderbird 2.0.0.23 (Windows/20090812) |
MIME-Version: | 1.0 |
To: | Marco Atzeri <marco_atzeri AT yahoo DOT it> |
CC: | "cygwin AT cygwin DOT com" <cygwin AT cygwin DOT com> |
Subject: | Re: Shared home dir, samba, and workgroups |
References: | <572842 DOT 74596 DOT qm AT web25502 DOT mail DOT ukl DOT yahoo DOT com> |
In-Reply-To: | <572842.74596.qm@web25502.mail.ukl.yahoo.com> |
X-IsSubscribed: | yes |
Mailing-List: | contact cygwin-help AT cygwin DOT com; run by ezmlm |
List-Id: | <cygwin.cygwin.com> |
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 |
Marco Atzeri wrote: > --- Mar 9/3/10, Wes Barris ha scritto: > >> Marco Atzeri wrote: >>> --- Mar 9/3/10, Wes Barris ha scritto: >>> >>>> Wes Barris wrote: >>>>> I use Cygwin 1.7 on my XP desktop system at >>>> work. I like having the >>>>> same home directory on this Windows XP system >> as I do >>>> on our Unix >>>>> server. The Windows XP system is a >> member of a >>>> domain. The Unix >>>>> server is not. The Unix server is >> running Samba >>>> and is configured >>>>> with a workgroup name. My home directory >> on the >>>> Unix server is >>>>> mounted as a mapped network drive on the >> Windows XP >>>> system. >>>>> Everything in the above setup is working >>>>> properly from the Unix server side and from >> the >>>> Windows side when >>>>> working with Windows Explorer. I can >> create and >>>> delete files via >>>>> Windows Explorer and they show up on the Unix >> side >>>> with proper >>>>> ownership and permissions (as controlled by >>>> Samba). Conversely, >>>>> I can create and delete files under Unix and >> access >>>> these files >>>>> from Windows Explorer. >>>>> >>>>> The problem is when I look at my mapped >> network home >>>> directory >>>>> with Cygwin, my home directory files are owned >> by >>>> nobody ('????????') >>>>> and have a group of nobody. I am >> guessing that >>>> this is because my >>>>> Windows SID in /etc/passwd is the SID of my >> domain >>>> user and since >>>>> the Samba server is not part of this domain >> the files >>>> look like they >>>>> are from an unknown user. >>>>> >>>>> In our Samba server there is a file (usermap) >> that >>>> maps unix usernames >>>>> to windows usernames. This appears to be >> working >>>> when working with >>>>> Windows Explorer. Why doesn't this work >> with >>>> Cygwin? What is the >>>>> way to fix this? Do I somehow need to >> map my >>>> unix username to a >>>>> windows SID? Do I need to turn off >> ntsec? >>> you need to map the WINDOWS SID to the UNIX username >>> >>> so you need to add on /etc/passwd and etc/group >>> the right references. >>> >>> see: >>> http://cygwin.com/cygwin-ug-net/using-utils.html#mkpasswd >>> http://cygwin.com/cygwin-ug-net/ntsec.html >> I've read both of those pages many times. They don't >> appear >> to apply to my situation. What mkpasswd option(s) >> would you >> suggest? --local doesn't help map the Windows SID to >> the UNIX >> username, --domain doesn't do it. > > Web, > if mkpasswd can not help you to identify the SID, than > you can try Setacl > http://setacl.sourceforge.net/ > > using as: > $ SetACL.exe -on $(cygpath -aw YOUR_FILE) -ot file -actn list -lst "f:sddl;w:o,g,s,d" > > will provide the full list of SID and ACL of the file > or directory. The answer is a bit cryptic but it is very detailed. > > After that you can create,by hand, the right reference in > your > /etc/passwd and /etc/group Thanks Marco. I was a bit skeptical having already worked so hard on resolving this. Using setacl.exe I was able to determine both the owner and group SIDs: W:\>SetACL.exe -on wesbarris.pdf -ot file -actn list -lst "f:tab;w:o" wesbarris.pdf Owner: S-1-5-21-290311034-2557831423-1240041065-5424 DACL(protected): S-1-5-21-290311034-2557831423-1240041065-5424 full allow no_inheritance S-1-22-2-200 read allow no_inheritance Everyone read allow no_inheritance Using this information I modified my /etc/passwd and /etc/group files. The passwd file now contains a line for my domain user and a line for the owner of the files from my home directory server. It's a bit confusing (having a different user owning my home directory files) but everything appears to be working properly now. Thank you very much! >>>> Do I need to change >>>>> the mount options for /cygdrive? >>>> Should I assume from the lack of any response that >> there is >>>> no fix >>>> for this? >>>> >>>> -- Wes Barris >>> I should say no >>> Marco >> -- Wes Barris > > Marco > > > > -- Wes Barris -- 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
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |