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:date:from:reply-to:message-id:to:subject :in-reply-to:references:mime-version:content-type :content-transfer-encoding; q=dns; s=default; b=jH1Px+oFC+oflhsa vHGlzfvp0h4ojf31wA8OoZQ82og/laOEe7RTRXmvhZforpBDQKCC/S3IYEkbSE4O qF51dmhFzc/7Mfe7L3O6X1/PtGIFy93Qa8fswRtShTPJPJSG8SMDVqT4iR6RnGJQ MmXChtBIhWMEqs/qnha0HqZEf7U= 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:date:from:reply-to:message-id:to:subject :in-reply-to:references:mime-version:content-type :content-transfer-encoding; s=default; bh=TlYnoVqi2J9na/qdouexgc alsqE=; b=wQsPlC/R0HhHEfCf8tP28YJ5/4BOCNU+0K7YKIrUKtc1c5jGZTReE+ QHhGFyebbURoWXYN6xi8Rv+ppK9S4Do0YxmI/3eD7cBkFTcMhYQlBB9FMCrSSL6E EAX7XU9sphD47L6tyX/Ix5GGo5v1AAiKlgCLtXj9ql8NV8T5bULQY= 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_00,FREEMAIL_FROM,GIT_PATCH_2,KAM_THEBAT,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 spammy=H*M:yandex, H*UA:Bat!, H*F:D*ru X-HELO: forward103p.mail.yandex.net DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1550596800; bh=6WGcpnqpn8WU48SqX695bl2ResApJHMgYriuNBBuM7I=; h=Date:From:Reply-To:Message-ID:To:Subject:In-Reply-To:References; b=iYljbP9ffYLQGkZZcNX1cmGplpwXZ9Dw5YnhxjbOUpoDxLkJkmkY2F770cctRzYAN GNxFt6Z9grImzA63f0/G9H5+59j29EvHUo6T/JkiWQFr6tEwcaSnkPUgtizMPZPdlY xHMUemJtaNK7fv9AELgteaZ1LDy+uPl5AuCVKugo= Authentication-Results: mxback16j.mail.yandex.net; dkim=pass header.i=@yandex.ru Date: Tue, 19 Feb 2019 20:12:03 +0300 From: Andrey Repin Reply-To: cygwin AT cygwin DOT com Message-ID: <251521480.20190219201203@yandex.ru> To: Bill Stewart , cygwin AT cygwin DOT com Subject: Re: Windows to Cygwin username mapping: Domain before local account when duplicate name? In-Reply-To: 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> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-IsSubscribed: yes 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