X-Recipient: archive-cygwin@delorie.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:to:from:subject:date:message-id:references
	:mime-version:content-type:content-transfer-encoding; q=dns; s=
	default; b=yhgDaVm+Vxg+1ZuCOtRdXJogSE2t36Ir0HtLSTuU9Yf5y3xUo3LW5
	wCk91J7rWUl9ZXFE38lnN4A7iIIcwyADkoMY3pKJGlvd/rGZGnwJEp3qWXuEkDtn
	irb53QO4hF6llglxfxya6qAaAKXpJMQ0XZp4guoWewnl7J2rqZpahw=
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:to:from:subject:date:message-id:references
	:mime-version:content-type:content-transfer-encoding; s=default;
	 bh=I6RfLXVKvV61qx4KuSNrFcYobyE=; b=euXAvUcVNft7PLHBkmzePcxoypx2
	bT04whkxLXwnN0RLFJnVvYsOcaVwRSjtx70kOvieFPwdnJw1mS3uP2FQIxT4glPZ
	zO+lJv/36tSk3KG+bJq7og24nkWvJuwqBKPdkDkHaRnIPHGC1Xl3DsE1B1wT3xB8
	5Ts7dFThki2mexM=
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com
Authentication-Results: sourceware.org; auth=none
X-Virus-Found: No
X-Spam-SWARE-Status: No, score=-2.0 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_LOW,SPF_HELO_PASS,SPF_PASS,T_RP_MATCHES_RCVD autolearn=ham version=3.3.2
X-HELO: plane.gmane.org
To: cygwin@cygwin.com
From: Andrew Schulman <schulman.andrew@epa.gov>
Subject: Re: how to determine if a shell is running as Administrator?
Date: Thu, 05 Feb 2015 09:39:09 -0500
Lines: 14
Message-ID: <fku6dad0jhjvb25go1ifkbn58p6npd4qpn@4ax.com>
References: <slc6da9aq8g9e7h0aegafhfa86eahfd53p@4ax.com> <1147992409.122575.1423130728220.JavaMail.yahoo@mail.yahoo.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Archive: encrypt
X-IsSubscribed: yes

> 
> 
> Andrew Schulman wrote:
> > What's a reliable and efficient way to determine programmatically if the shell> that's running has elevated privileges?
> 
> > Or if you prefer, how can I tell if the shell was started with "Run as
> > administrator"?
> 
> If you search the  mailing list archive for "Change PS1 when running as administrator" there are several suggested ways.

Thanks.  Consensus there is to look for group ID 544, although as the other
thread here shows, group 0 or 114 can also show it.

Andrew


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

