X-Recipient: archive-cygwin AT delorie DOT com X-SWARE-Spam-Status: No, hits=-4.4 required=5.0 tests=AWL,BAYES_00,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: References: <502C6B1C DOT 5030900 AT cygwin DOT com> <20120816090344 DOT GD5536 AT calimero DOT vinschen DOT de> <20120816113834 DOT GF17546 AT calimero DOT vinschen DOT de> <502D435C DOT 2070801 AT t-online DOT de> Date: Thu, 16 Aug 2012 16:10:53 -0400 Message-ID: Subject: Re: Question about UAC and bash/cygwin From: Lord Laraby To: Cygwin Mailing List Content-Type: text/plain; charset=ISO-8859-1 X-IsSubscribed: yes Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , 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 Thu, Aug 16, 2012 Christian Franke 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