X-Recipient: archive-cygwin@delorie.com
X-SWARE-Spam-Status: No, hits=-3.4 required=5.0	tests=AWL,BAYES_20,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,KHOP_RCVD_TRUST,KHOP_THREADED,RCVD_IN_DNSWL_LOW,RCVD_IN_HOSTKARMA_YE
X-Spam-Check-By: sourceware.org
MIME-Version: 1.0
In-Reply-To: <502D435C.2070801@t-online.de>
References: <CAG9p0OTFaLUp7c8zpOtVQ=4zt-=fAqPvURJw758FS+d2rPOtgw@mail.gmail.com>	<CE9C056E12502146A72FD81290379E9A49600AF0@ENFIRHMBX1.datcon.co.uk>	<CAG9p0OQsu08mOqGC4NkAvKE_GbjvBJk675XR6TdU5+urbNsEuQ@mail.gmail.com>	<502C6B1C.5030900@cygwin.com>	<CAG9p0OS3HKvaE9ye6g3vKP4kXPZGBw=uc-ELb0WcvdPefGQmFg@mail.gmail.com>	<20120816090344.GD5536@calimero.vinschen.de>	<CAG9p0ORs1BLte6nm_8iAHQan1Y+mESJQpNmjf=SiuJjHuSr83g@mail.gmail.com>	<20120816113834.GF17546@calimero.vinschen.de>	<502D435C.2070801@t-online.de>
Date: Thu, 16 Aug 2012 15:33:17 -0400
Message-ID: <CAG9p0OQ2puS4egaS0YMdh8yeWxwQYS_4piNS20AwssKPTz6fEw@mail.gmail.com>
Subject: Re: Question about UAC and bash/cygwin
From: Lord Laraby <lord.laraby@gmail.com>
To: cygwin@cygwin.com
Content-Type: text/plain; charset=ISO-8859-1
X-IsSubscribed: yes
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
Precedence: bulk
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie.com@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

On Thu, Aug 16, 2012 at 3:00 PM, Christian Franke
<Christian.Franke@t-online.de> wrote:
> Corinna Vinschen wrote:
>>
>> On Aug 16 07:06, Lord Laraby wrote:
>-8
>>
>> What is it good for to have uid 0?  You want to know if you have admin
>> rights, so why don't you simply check for the admin group in the
>> supplementary group list?
>>
>> Here's what I do in my tcsh ~/.cshrc profile to set the prompt:
>>
>>    id -G | egrep -q '\<544\>' && set prompt = '#  || set prompt = '\$ '
>>
>>
>
> I use this simple check which does not depend on /etc/group contents:
>
>  test -r /proc/registry/HKEY_LOCAL_MACHINE/SECURITY && PS1='# ' || PS1='$ '
>
> Relies on the fact that Cygwin (unlike most non-Cygwin programs) enables
> SeBackupPrivilege if available.
>
> See also: http://cygwin.com/ml/cygwin/2012-02/msg00806.html
>
> Christian

I'll give that a go as a start. But, I would still like to see by
Cygwin uid shown as 0 when I am elevated. Because it's the same as the
windows equivalent of su.

Regards,

LL

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

