From: Bill Stewart <bstewart@iname.com>
To: cygwin@cygwin.com
Subject: Re: Windows to Cygwin username mapping: Domain before local account when duplicate name?
Date: Sat, 16 Feb 2019 01:05:00 -0000 [thread overview]
Message-ID: <CANV9t=QEz=L-ftqr06QZPxZSkhqGzrFS3s93s6ztBeKJk5WnjA@mail.gmail.com> (raw)
In-Reply-To: <20190215213159.GQ2702@calimero.vinschen.de>
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
next prev parent reply other threads:[~2019-02-15 22:48 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-02-14 23:50 Bill Stewart
2019-02-15 10:05 ` Sam Edge (Cygwin)
2019-02-15 15:56 ` Bill Stewart
2019-02-15 16:05 ` Brian Inglis
2019-02-15 16:14 ` Andrey Repin
2019-02-15 16:51 ` Corinna Vinschen
2019-02-15 19:25 ` Bill Stewart
2019-02-15 20:30 ` Corinna Vinschen
2019-02-15 20:43 ` Bill Stewart
2019-02-15 20:50 ` Corinna Vinschen
2019-02-15 21:00 ` Bill Stewart
2019-02-15 21:38 ` Corinna Vinschen
2019-02-15 21:51 ` Bill Stewart
2019-02-16 1:05 ` Bill Stewart [this message]
2019-02-16 1:26 ` Andrey Repin
2019-02-19 16:15 ` Bill Stewart
2019-02-19 17:20 ` Bill Stewart
2019-02-19 19:02 ` Andrey Repin
2019-02-15 21:48 ` Brian Inglis
2019-02-15 22:19 ` Bill Stewart
2019-02-16 13:12 ` Corinna Vinschen
2019-02-16 15:33 ` Brian Inglis
2019-02-16 15:35 ` Corinna Vinschen
2019-02-16 17:14 ` Brian Inglis
2019-02-16 17:43 ` Corinna Vinschen
2019-02-18 9:14 ` Corinna Vinschen
2019-02-15 21:00 ` Andrey Repin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CANV9t=QEz=L-ftqr06QZPxZSkhqGzrFS3s93s6ztBeKJk5WnjA@mail.gmail.com' \
--to=bstewart@iname.com \
--cc=cygwin@cygwin.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).