Question about UAC and bash/cygwin

Lord Laraby lord.laraby@gmail.com
Thu Aug 16 19:52:00 GMT 2012


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



More information about the Cygwin mailing list