From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29462 invoked by alias); 16 Aug 2012 11:39:16 -0000 Received: (qmail 29377 invoked by uid 22791); 16 Aug 2012 11:38:54 -0000 X-Spam-Check-By: sourceware.org Received: from aquarius.hirmke.de (HELO calimero.vinschen.de) (217.91.18.234) by sourceware.org (qpsmtpd/0.83/v0.83-20-g38e4449) with ESMTP; Thu, 16 Aug 2012 11:38:38 +0000 Received: by calimero.vinschen.de (Postfix, from userid 500) id 379E02C00CA; Thu, 16 Aug 2012 13:38:34 +0200 (CEST) Date: Thu, 16 Aug 2012 12:27:00 -0000 From: Corinna Vinschen To: cygwin@cygwin.com Subject: Re: Question about UAC and bash/cygwin Message-ID: <20120816113834.GF17546@calimero.vinschen.de> Reply-To: cygwin@cygwin.com Mail-Followup-To: cygwin@cygwin.com References: <502C6B1C.5030900@cygwin.com> <20120816090344.GD5536@calimero.vinschen.de> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com X-SW-Source: 2012-08/txt/msg00371.txt.bz2 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). 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 = '\$ ' 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