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=K/Uu3XxaZN5n98WI V4GDkGc6xzTxl6shFZ/M+f3ebpZsV7CmEVy09kGmpWyE+RecyNPymQpPSVlqlPAC E0VzptHnzKDartazbNfOpXh9S7311EAXi1b9C+KoFSakYo3FGmPkFWSvMvuDWp2T JDQKzrS7gxwfkLm51N/QSY/CPow= 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=+fz7jaUYKRRajcAyjOgte5 AsPrI=; b=DOtoBH76RStsfEjx20LqzkTvo05/iVKnUQ5czJPmJ27OjgFqHOocUe HZJROnzn2bljZdXEVc4D2kIxtGervThKU5yPpbyFJNvp4OK7iUJbSx4RGN1IA35Q 2jmqipaQ5jasqEeORK3XdE4wONgUvyB+J2DynZZWc0pYcCaELqkXc= 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,MIME_BASE64_BLANKS,RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.2 spammy=sk:unsubsc, english, HX-Priority:Normal, H*M:yandex X-HELO: forward103o.mail.yandex.net DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1550279102; bh=jLAFr7mKorya+cxiEANdqcSdv7uQlDyyFui9JdJna6c=; h=Date:From:Reply-To:Message-ID:To:Subject:In-Reply-To:References; b=wzltLV6h6gCedxj9X4BjZd24BXDmbTZLL8n8F2sRXlRiRRghPHhEWzI4cOaWqM6Ht oEdQirPNxq7eAnK6HVrGFAOFMEJRNszBimbq52u2sKz/tUpeNzZotCz+OTPfe64JF7 ixFuQ9Y6Ge8wjGgXIuo7nMLvG2kUlvHBe8C2yULQ= Authentication-Results: mxback4o.mail.yandex.net; dkim=pass header.i=@yandex.ru Date: Sat, 16 Feb 2019 03:57:18 +0300 From: Andrey Repin Reply-To: cygwin AT cygwin DOT com Message-ID: <477950328.20190216035718@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=utf-8 X-IsSubscribed: yes Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from base64 to 8bit by delorie.com id x1G15j4E029061 Greetings, Bill Stewart! >> What is a "typical" order?!? >> >> If you login locally to a domain member machine the default domain is >> the logon domain of this machine. If that's not what you want you have >> to choose the logon domain of your account explicitely, even if it's the >> local machine SAM. Windows will not try to find the user name locally >> if you didn't chose it explicitely. You get "The user name or password >> is incorrect. Try again" instead. >> >> The only exception I'm aware of is the "Administrator" account, at least >> in Windows 10. > Here's a real-world scenario you might not have considered... What is your nsswitch configuration, yet again?… > I have a local account named "Admin" on my computer I use for > administrative tasks. > My computer is a member of a medium-side domain (about 25000 users), > and at some point in the past an admin created a group named "Admin" > that I didn't even know existed. > 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 > Hence the question. > Regards, > 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 -- With best regards, Andrey Repin Saturday, February 16, 2019 3:56:41 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