delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2012/08/16/10:32:58

X-Recipient: archive-cygwin AT delorie DOT com
X-Spam-Check-By: sourceware.org
Date: Thu, 16 Aug 2012 16:32:05 +0200
From: Corinna Vinschen <corinna-cygwin AT cygwin DOT com>
To: cygwin AT cygwin DOT com
Subject: Re: Question about UAC and bash/cygwin
Message-ID: <20120816143205.GI17546@calimero.vinschen.de>
Reply-To: cygwin AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
References: <CAG9p0OTFaLUp7c8zpOtVQ=4zt-=fAqPvURJw758FS+d2rPOtgw AT mail DOT gmail DOT com> <CE9C056E12502146A72FD81290379E9A49600AF0 AT ENFIRHMBX1 DOT datcon DOT co DOT uk> <CAG9p0OQsu08mOqGC4NkAvKE_GbjvBJk675XR6TdU5+urbNsEuQ AT mail DOT gmail DOT com> <502C6B1C DOT 5030900 AT cygwin DOT com> <CAG9p0OS3HKvaE9ye6g3vKP4kXPZGBw=uc-ELb0WcvdPefGQmFg AT mail DOT gmail DOT com> <20120816090344 DOT GD5536 AT calimero DOT vinschen DOT de> <CAG9p0ORs1BLte6nm_8iAHQan1Y+mESJQpNmjf=SiuJjHuSr83g AT mail DOT gmail DOT com> <20120816113834 DOT GF17546 AT calimero DOT vinschen DOT de> <CAG9p0ORUkRjJekPeD7UcN5-uHE+sFHWqAv0P60k+_o3tw_caSA AT mail DOT gmail DOT com>
MIME-Version: 1.0
In-Reply-To: <CAG9p0ORUkRjJekPeD7UcN5-uHE+sFHWqAv0P60k+_o3tw_caSA@mail.gmail.com>
User-Agent: Mutt/1.5.21 (2010-09-15)
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT 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

On Aug 16 08:48, Lord Laraby wrote:
> 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.

Huh?  When you're not running elevated, the admin group will not be in
the list of supplementary groups.  What other information do you need?
What's the problem?


Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Project Co-Leader          cygwin AT cygwin DOT com
Red Hat

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