Web lists-archives.com

Re: Windows to Cygwin username mapping: Domain before local account when duplicate name?

Greetings, Bill Stewart!

> On Fri, Feb 15, 2019 at 3:48 PM Bill Stewart wrote:

>> This means that when I test getent using the name "Admin", Cygwin
>> finds the domain group:
>> PS C:\> getent -w passwd admin
>> admin:nnnnnnnn:DOMAINNAME\admin:S-1-5-21-nnnnnnnnnn-nnnnnnnnn-nnnnnnnnn-nnnnnn
>> I get that this is by design, but .NET finds the local account first,
>> which is what I was expecting:
>> PS C:\> $name = [Security.Principal.NTAccount] "admin"
>> PS C:\> $sid = $name.Translate([Security.Principal.SecurityIdentifier])
>> PS C:\> $sid.Translate([Security.Principal.NTAccount])
>> Value
>> -----

> So then - just to follow up - Cygwin is for sure going to stick with
> "domain first" when resolving an account name that doesn't include an
> authority.


> (a) Is this correct?


> (b) Is there a particular reason this order was chosen (instead of
> local first, then domain, i.e., the usual Windows order)?


With best regards,
Andrey Repin
Tuesday, February 19, 2019 20:11:34

Sorry for my terrible english...

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