This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Question about UAC and bash/cygwin


On Thu, Aug 16, 2012 Corinna Vinschen wrote:
> On Aug 16 07:06, Lord Laraby wrote:
>>  My, major emphasis is recognizing in the Cygwin dll
>> or startup code somewhere) that the user has full Administrator rights
>> and simply replacing his normal UID with 0 (or that of whomever root
>> seems to be by /etc/passwd). Internally (at cygwin.dll level) he/she
>> is still the same user, but the desired effects would be that bash and
>> others might change his prompt to '#' and that scripts can check for
>> admin rights and files he/she created would become owned by UID 0 (or
>> the Administrators group).

See, here where I said I want to know if the user is in fact
"elevated"?  I'm always a member of the Administrators Group (group
544) even when I have no such privileges to "administer" the system.

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

The uid 0 feature is just a unixy way of indicating that my account
has already passed and accepted the UAC and I'm now running as a
normal admin (not a puny user).

> Here's what I do in my tcsh ~/.cshrc profile to set the prompt:
>
>   id -G | egrep -q '\<544\>' && set prompt = '#  || set prompt = '\$ '
>

I can set that. But then I'm still fooling myself if I am not running
with escalated privileges, I'm no more 'root' than my cat is.

> Corinna
>

Thanks for the advice though. I'll work on something to get what I am seeking.

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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]