delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2019/02/15/17:48:55

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=yQqfdt7
iVzDr33JobPPpDgkOjD/zpS8bYPfv35AWD8ABnYtVRBYt2VA6vObDUICDwpb+8lu
C9oWjJwBcGZerXrkFozqptYtp0qB3NFJ51Lqe1mlyAd9v466yidXmkrmvMMeQDLd
4SmeSbGXJiwVcdfbKB6Cl3K0gHmmnDmFYzog=
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=GGv3ckJAJ7Wzr
+tLHOYspZFFTbE=; b=mnS7TjjUwxL2LYyPD8LseDB3qHyg5vZbHjk1YWn+3kGV0
zJWbzwXtSNnXlRibRzyMMef4xVO0cO8MSwRmY+hDFiVrLv4SYSAUnGDoFAPibhg8
ZHRCMjhG027sqFv4cf/5XSQjLFfwMe4lag6vE1aT/Q1I0ZyUv9Ms3/gIgRiZ2U=
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=-7.6 required=5.0 tests=BAYES_00,FREEMAIL_FROM,GIT_PATCH_2,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 spammy=Admin, 25000, password, Administrator
X-HELO: mout.gmx.com
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=mail.com; s=dbd5af2cbaf7; t=1550270902; bh=boflN74i16n9z+08Vpb+prS3wJTaSt1EGBAzV+yxjao=; h=X-UI-Sender-Class:References:In-Reply-To:From:Date:Subject:To; b=Bk/472AFBOjt5UpVAiBoa9XClMa18EHQtN9wwuVFltsoEjtZZLsknWxxFYCmYA7H4 D6T2rn0mJtrR6sXcf71qcXx6ygOrd/WbLoAn9/eSCoh+pNAoesqK4Mr3PTaj7Ck9Wq U5b1iLz/iZeenj3WPF+mLkHM5PeTaI7TpJn8K56I=
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>
In-Reply-To: <20190215213159.GQ2702@calimero.vinschen.de>
From: Bill Stewart <bstewart AT iname DOT com>
Date: Fri, 15 Feb 2019 15:48:08 -0700
Message-ID: <CANV9t=QEz=L-ftqr06QZPxZSkhqGzrFS3s93s6ztBeKJk5WnjA@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 2:32 PM Corinna Vinschen wrote:

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

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

- Raw text -


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