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: 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 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: <50cba8d1-4794-8db9-d1f3-ab9476421db7 AT gmx DOT com> <20190215163817 DOT GI2702 AT calimero DOT vinschen DOT de> <20190215202936 DOT GL2702 AT calimero DOT vinschen DOT de> <20190215204326 DOT GO2702 AT calimero DOT vinschen DOT de> <20190215213159 DOT GQ2702 AT calimero DOT vinschen DOT de> In-Reply-To: From: Bill Stewart Date: Tue, 19 Feb 2019 08:47:26 -0700 Message-ID: Subject: Re: Windows to Cygwin username mapping: Domain before local account when duplicate name? To: cygwin AT cygwin DOT com Content-Type: text/plain; charset="UTF-8" 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