delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2019/02/19/10:48:41

X-Recipient: archive-cygwin AT delorie DOT com
DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:mime-version:references:in-reply-to:from:date
:message-id:subject:to:content-type; q=dns; s=default; b=MY94AnE
Hd0Sq1m5hvYXhdmta4XlFLKvy2gx+wyMTK4xRv1G+r9sevYgz18QiY+UOWsP6n15
ZkLjKQYMBsMHxSi2UF8cZAtfeJ1FoZ5fO4kZVk1Y2CHi1bbJY/AY75OaYE3THPD8
5/F8bt+Gj3c/9tGFiSNQN3xDDAU0ogwNO7CU=
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:mime-version:references:in-reply-to:from:date
:message-id:subject:to:content-type; s=default; bh=UTURjDDqzO9zq
QPSmDaEpXFdkEU=; b=N549qHle2LS/f8vY5vLZnjqup4+IKIZqX4SnqgLUCKSEp
ryyAueaBAk97E+XQszcOQmk41PF16n62SVxWQkdskzwNPAVh0ZJ3yqOVRkyR4s89
k5NcbBrHLYDRdLN/0JX5eFKmyShtUdFAo/BG0nJhoTS7ObBHF4hCedp5mEwnV4=
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
Authentication-Results: sourceware.org; auth=none
X-Spam-SWARE-Status: No, score=-5.7 required=5.0 tests=BAYES_40,FREEMAIL_FROM,GIT_PATCH_2,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 spammy=UD:mail.com, mailcom, mail.com, Hx-languages-length:1003
X-HELO: mout.gmx.com
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=mail.com; s=dbd5af2cbaf7; t=1550591260; bh=SuBpxMXn5/eVQBwy65lgIi7wuX5/MDQTYQTSncARG9s=; h=X-UI-Sender-Class:References:In-Reply-To:From:Date:Subject:To; b=eZB9p5HZgeQWtjKUbZKaSQzTCMHEiHU23atmrh3tHycCwEB5AQ8DfjyVNW2Kot5nV RBXU2+2tiDSPJF9GNDlCWCGQQlZ/pUjYqD1G/97aM4eEo4bv7OMNjS9ihucFomOXVm xO1Ra4ejSyOAK+J5Q9xAs4U6lEjUfdjlsEOopD+g=
X-UI-Sender-Class: 214d933f-fd2f-45c7-a636-f5d79ae31a79
MIME-Version: 1.0
References: <CANV9t=SNfgP-CA32yfPwLv2=d0F8xtpdCT4o_wwGFGE+F3SEuA AT mail DOT gmail DOT com> <50cba8d1-4794-8db9-d1f3-ab9476421db7 AT gmx DOT com> <CANV9t=QQ1higAt1qeDF4fckkz_6eqQJtdhau8+uhrAvGtWUK_A AT mail DOT gmail DOT com> <20190215163817 DOT GI2702 AT calimero DOT vinschen DOT de> <CANV9t=Rm+su=qDqdFN-LqiMLEAHJD7WxW_OSqqSpqgeb6ir++w AT mail DOT gmail DOT com> <20190215202936 DOT GL2702 AT calimero DOT vinschen DOT de> <CANV9t=SdQPZw_VF95HwDrVRU1KzdHA61GJBRgA1weHryHUO6-w AT mail DOT gmail DOT com> <20190215204326 DOT GO2702 AT calimero DOT vinschen DOT de> <CANV9t=Q5M+V9TPEN-GaGzLtK_8AO5fUenajQ+T-VZX6+kbrMMw AT mail DOT gmail DOT com> <20190215213159 DOT GQ2702 AT calimero DOT vinschen DOT de> <CANV9t=QEz=L-ftqr06QZPxZSkhqGzrFS3s93s6ztBeKJk5WnjA AT mail DOT gmail DOT com>
In-Reply-To: <CANV9t=QEz=L-ftqr06QZPxZSkhqGzrFS3s93s6ztBeKJk5WnjA@mail.gmail.com>
From: Bill Stewart <bstewart AT iname DOT com>
Date: Tue, 19 Feb 2019 08:47:26 -0700
Message-ID: <CANV9t=SW+Zt7X6ERF+d9=PhqQrxA=HSKiLJA+Xvk52rZo88k2A@mail.gmail.com>
Subject: Re: Windows to Cygwin username mapping: Domain before local account when duplicate name?
To: cygwin AT cygwin DOT com
X-IsSubscribed: yes

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.

(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)?

Thanks,

Bill

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

- Raw text -


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