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

Andrey Repin anrdaemon@yandex.ru
Tue Feb 19 19:02:00 GMT 2019


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
>> -----
>> COMPUTERNAME\Admin

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

No.

> (a) Is this correct?

No.

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

No.


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



More information about the Cygwin mailing list