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

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: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 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=-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 AT cygwin DOT com
From: Andrew Schulman <schulman DOT andrew AT epa DOT 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 AT 4ax DOT com> <1147992409 DOT 122575 DOT 1423130728220 DOT JavaMail DOT yahoo AT mail DOT yahoo DOT com>
Mime-Version: 1.0
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

- Raw text -


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