delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2015/02/05/09:55:10

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:to:subject:message-id:reply-to
:references:mime-version:content-type:in-reply-to; q=dns; s=
default; b=gUaXQJHT60F3KVVYp//5zQTyjZIjL/fOcGYcNAq3D6pxRNkJyozi6
ic08YUJ/75mTGA45wFc7hzF+9Nn6EE2dJ+gn1WepdYd5JY1+WWXjZkpZ5Mse1Wsv
rdBU6FEm4I7IViooTsBSk04K1ql0AMQGlW8YhlhbwKOTb98RCpbOJs=
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:to:subject:message-id:reply-to
:references:mime-version:content-type:in-reply-to; s=default;
bh=ifNw21OVtdr8g6PQHEWMAf/gytk=; b=fBetyXfAi5lL5AsbsgUh0J1vLVBn
gd4BDLBz4yxq2O+jU0i1wvb7mJfW3LEYjxHHzAkflUtp397KdBvuVt54JGX/lu7S
zFSrhji389D2gbUyufwvbkouuqBYAz9V0iS1x0LgfeeMWTnbnnF7Ywc86QH9WlPH
q+oevqcSYtExHw8=
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-Virus-Found: No
X-Spam-SWARE-Status: No, score=-5.9 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.3.2
X-HELO: calimero.vinschen.de
Date: Thu, 5 Feb 2015 15:48:35 +0100
From: Corinna Vinschen <corinna-cygwin AT cygwin DOT com>
To: cygwin AT cygwin DOT com
Subject: Re: how to determine if a shell is running as Administrator?
Message-ID: <20150205144835.GU2635@calimero.vinschen.de>
Reply-To: cygwin AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
References: <slc6da9aq8g9e7h0aegafhfa86eahfd53p AT 4ax DOT com> <1147992409 DOT 122575 DOT 1423130728220 DOT JavaMail DOT yahoo AT mail DOT yahoo DOT com> <fku6dad0jhjvb25go1ifkbn58p6npd4qpn AT 4ax DOT com>
MIME-Version: 1.0
In-Reply-To: <fku6dad0jhjvb25go1ifkbn58p6npd4qpn@4ax.com>
User-Agent: Mutt/1.5.23 (2014-03-12)

--BtmVPk+Smchi6n7w
Content-Type: text/plain; charset=utf-8
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Feb  5 09:39, Andrew Schulman wrote:
> >=20
> >=20
> > Andrew Schulman wrote:
> > > What's a reliable and efficient way to determine programmatically if =
the shell> that's running has elevated privileges?
> >=20
> > > Or if you prefer, how can I tell if the shell was started with "Run as
> > > administrator"?
> >=20
> > If you search the  mailing list archive for "Change PS1 when running as=
 administrator" there are several suggested ways.
>=20
> Thanks.  Consensus there is to look for group ID 544, although as the oth=
er
> thread here shows, group 0 or 114 can also show it.

Preferredly you remove the "root" group from /etc/group or, even better,
you remove /etc/group ;)


Corinna

--=20
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Maintainer                 cygwin AT cygwin DOT com
Red Hat

--BtmVPk+Smchi6n7w
Content-Type: application/pgp-signature

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2

iQIcBAEBAgAGBQJU04LDAAoJEPU2Bp2uRE+g4W0P/jwXrlMoODdVvCzaWay+3Kl+
xQQFMZxpuVqNYGPt3o0jcgyjI0Rg0L1Hl6FpkrVkeRI84npqFw/PhdozMDZiHvel
Vikj4aT24+8H2XUkl+BE7UFYzXoVsqwX18nO92vFVWlJ/LBlr65LDQHvKhfDXSH+
yUtD8Buf9mwe03RAst3vbIOrFIDCsXTG2VNuKpLdMmRRmUdfkZbC6edq6Kbqv4vp
fLjC4qQzHWpNn9LKR/7lcIonjZW6JGqqmaRVknCkPsowt4ME7NMk2pHJpnx2mCmB
H+nH3YSco93gk6zR1dixgcf3r46jJ5nXlig/LZU/2zrPQ/8a3fRsiXpLZIJQUPu2
4FEO3BDZ+KcnH2cMykrn9Sy7sNmnbEZvEMOpCPJKqhlealk3y4I0q3tXAt27PZ/B
2Imef622fHCE7mZya7xk1utbp3dTC6vwAA89uPAdxuoxpnjmB6hIdopprT/0Boev
wswFPreQnyLfiq/E8Xyy6b8nQfLnwav203O5eYf48z6yIre1CmesCz8KOUX0l/SQ
bYqGOdX8G8df9qoaaVzv+nGfYYjekTj1oGTrmRY+uO52GmV5lHy2Eqii5f6U77+G
rlWvLDMToZnyC+qBPaDfcCnH+gs0Oe1VtUsQT3XI7p8RE8i0UD1xdYvlibV8Z/50
EWT8OMsATlOaNtg3/Usj
=Rvvq
-----END PGP SIGNATURE-----

--BtmVPk+Smchi6n7w--

- Raw text -


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