delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2023/08/19/13:35:07

X-Recipient: archive-cygwin AT delorie DOT com
DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 9E4A03870885
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cygwin.com;
s=default; t=1692466505;
bh=GLT2jDSDQjpUCefG6MuwNxmYptyvx7atYoZST1n9PVw=;
h=References:In-Reply-To:Date:Subject:To:List-Id:List-Unsubscribe:
List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:
From;
b=Dn68YT+aD3BHRFSzt/4erqo1BU8jx/v7U9DzXfpetWP8gKPsWx9VpATC0oK59x8LA
uvXK7Gb9Jr1bnZcMVwbTrJDfzDa18vLkwV9uBQ51efdWU0bvaiLt2AI0F+sKnV2vbY
feaMTf9GWvMhWZZnGTpuLpDAJelkTIljkmvjnaZ4=
X-Original-To: cygwin AT cygwin DOT com
Delivered-To: cygwin AT cygwin DOT com
DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 8460A3858C1F
X-UI-Sender-Class: f2cb72be-343f-493d-8ec3-b1efb8d6185a
X-Gm-Message-State: AOJu0YyjEpyWZ086M5MMReanTqvbsjPtVaPkHsOx7pVoTtr/+sPoCEfT
j6H7HJylWpfoeFpZFXvSwZg8KK8jGDc9UrfTW18=
X-Google-Smtp-Source: AGHT+IHBESpVW+HxEZH88hT7jidWb27WRHwddH3spIcm90cyV6+uR3QKugd0kIPiku6uJ73bKiPIBA4NrVSrfOmd+Y8=
X-Received: by 2002:a05:6512:31ca:b0:4fd:d254:edc6 with SMTP id
j10-20020a05651231ca00b004fdd254edc6mr763719lfe.26.1692466463463; Sat, 19 Aug
2023 10:34:23 -0700 (PDT)
MIME-Version: 1.0
References: <CANH4o6OpsvT99AeJ2uTcqyajWQHmffYJqV=RR4HBxoFaveR7sQ AT mail DOT gmail DOT com>
<87cyzj4fep DOT fsf AT Rainer DOT invalid>
In-Reply-To: <87cyzj4fep.fsf@Rainer.invalid>
Date: Sat, 19 Aug 2023 11:33:58 -0600
X-Gmail-Original-Message-ID: <CANV9t=SzZXU-1xt8XXfyrhqU0nyWv_G0v527mUsmnF3ANL28yg AT mail DOT gmail DOT com>
Message-ID: <CANV9t=SzZXU-1xt8XXfyrhqU0nyWv_G0v527mUsmnF3ANL28yg@mail.gmail.com>
Subject: Re: Test for Windows Administrator permissions from Cygwin
terminal|script?
To: cygwin AT cygwin DOT com
X-Provags-ID: V03:K1:CuFm/CYveFqevRemFxPWKaDJXl2+xxn7GmC98xbDQWJiZArm+m8
No/nhP39JYx1sWw8+aUn37/OicadswGPl7+hDz6gzu0vC2MzSBhXTrnW6HE0PfxBc/XiCO6
8HnGfplaKvNcWQMRJsjbBqM+cSVqem2IEDBjuhUEZXLcgd9vqyAPIP1MhaDTFYFwRO910CO
cmkCo8eXEFhI+j5Bf4UhA==
UI-OutboundReport: notjunk:1;M01:P0:0Dkt8YDEJlM=;GYzMb9o53AVAOnJlszKBrF+7ClA
QP8BO9jvhCWNfZPlz91ROjBMeWa90r2OhVYuALa0QQ27ItlpEBJkPTcFTWc9QX3PZXXfWzu6O
BUjRojPqm12wyg34kfoB5iGrX98TKOwnt/7HhOT/x6Ifp5fVX4VH2LhX0P4I/se2EPvubqVyy
WC06iIKuEi3VBdwkbtSuO8n1ZzVGghizgth0L4Sw6UsD308UIrZNxab/W+AcUsG25s5BJBWYD
QGANREuQSNta1tk2TatIT0d5FD51ble7bJNaESp1Ji2wRupcqnWu4zu4Fbo/gYDqdJkPdAMvC
p+zPK7nMYwiGWUfhhxwaI/ayio8g2yhewLUuUeVmM3mmzeCnpMVa7ETubT5TAISg/9pPHCIcs
obebFJDIPppsfsd4s8dPOhCRQwIDqtyqHykVw4agKble1mnTtjEYfRHuaOIZUh7Q2Iv4yGIZQ
VX0o39MmXN53IUfV/F243MgEq4maCsm36dIIn8LGuFiEv5FTY0Ajw7H3ydmKspVgO2PAObzvG
+oDQ91Xg/E4VQQPGs3h0VwsBHN5rMZQIkw9L/124X/jthxCz+9VPWSj9PhrDpnRJ1DE9R8Qlp
KOliwY+ogYLPegbsWhm5oFomId9WZKmV/fVnWmoLGGoE6E+rBRRv+EhKPaf1XeSrDmcqEZMFN
xjSVMuMfJ6FmLAk4hQfXDwhtOmxryEF96nXEzUAwF2aIUiw2TgEm843xqNNhkmeHqBqp/ErCc
9gIriwQTq1dFdYGri4a4nGwD7cQaocqIhvl8/XX8SN/U6iCcu4NfYYIywS5U+PJpF8XOtQTa0
Gc0qlbXkd/WI79TETuzEwaqHzJ8s+J9A14J0FsyU5wftanSdCKw4gKCOzqaGXVSTTwq1gXyc0
XO5f1BIhTqrzpwrvwL6ZTRN9EE5sJOI74y09NmUy7VOIzbluf326k1O7XIpAjO5cpMqIUI27M
eGCq4fsk62oqqSnxVIbSak+T+KM=
X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00, DKIM_SIGNED,
DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, HTML_MESSAGE,
RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H4, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE,
SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on
server2.sourceware.org
X-Content-Filtered-By: Mailman/MimeDel 2.1.29
X-BeenThere: cygwin AT cygwin DOT com
X-Mailman-Version: 2.1.29
List-Id: General Cygwin discussions and problem reports <cygwin.cygwin.com>
List-Archive: <https://cygwin.com/pipermail/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-request AT cygwin DOT com?subject=help>
List-Subscribe: <https://cygwin.com/mailman/listinfo/cygwin>,
<mailto:cygwin-request AT cygwin DOT com?subject=subscribe>
From: Bill Stewart via Cygwin <cygwin AT cygwin DOT com>
Reply-To: Bill Stewart <bstewart AT iname DOT com>
Sender: "Cygwin" <cygwin-bounces+archive-cygwin=delorie DOT com AT cygwin DOT com>
X-MIME-Autoconverted: from base64 to 8bit by delorie.com id 37JHZ7Oc012206

On Sat, Aug 19, 2023 at 2:15 AM ASSI wrote:

Windows really doesn't have a defined notion of what is or is not an
> "administrator".  Each particular definition will be insufficient or
> invalid in certain contexts.
>

There is a definition of administrator in Windows: Your account is a
member, either directly or indirectly, of the Administrators group (SID
1-5-32-544).

With the introduction of User Account Control (UAC) in Windows Vista, if
you log on as a member of this group, processes are normally started with
the Administrators group disabled (i.e, the process is not running as a
member of Administrators). The "run as administrator" action starts a
process with the group enabled. This is commonly referred to as
"elevation." [Side note: As I understand it, one of the reasons UAC was
introduced was made was to break (some?) software developers' habits of
assuming their programs run as administrator, and to choose better data
storage paths, registry paths, etc. See
https://techcommunity.microsoft.com/t5/windows-blog-archive/faq-why-can-8217-t-i-bypass-the-uac-prompt/ba-p/701510
for a nice summary. Also helpful is the current docs on SIDs:
https://learn.microsoft.com/en-us/windows-server/identity/ad-ds/manage/understand-security-identifiers
]

On a domain, the Domain Admins group (which has a relative identifier, or
RID, of 512) is by default a member of the Administrators group. The
Administrators group is still there (same SID, S-1-5-32-544), and is called
a "Domain Local Security Group" (i.e., it's a local group that's shared by
all domain controllers.)

Hope this helps clarify.

Bill

-- 
Problem reports:      https://cygwin.com/problems.html
FAQ:                  https://cygwin.com/faq/
Documentation:        https://cygwin.com/docs.html
Unsubscribe info:     https://cygwin.com/ml/#unsubscribe-simple

- Raw text -


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