delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2014/06/17/02:53:35

X-Recipient: archive-cygwin AT delorie DOT com
DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:message-id:date:from:mime-version:to:subject
:references:in-reply-to:content-type:content-transfer-encoding;
q=dns; s=default; b=wfH2HWuFeweTZlO2Ncflzxx7oJ45xA5gkj96NvHwhjQ
Q8Qu5MQzKn9+MR4eb3MLF+h9SoY4w7s6g7VlL2OuRqBpTV+0LkgFHXMncQ6ngTQ6
nwkrqRz9HcLd2oD6obvXqFKZ4CA8EMmSPcX8ptvmcRYGMX1ClZ5T7okJdxQG6gOo
=
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:message-id:date:from:mime-version:to:subject
:references:in-reply-to:content-type:content-transfer-encoding;
s=default; bh=Wi1nBy+nxNtybsoNp5S8mYNAMK4=; b=c/LiTkiSTwHpBJcQo
mP33JmswAEVtzfyqa89Yt9IVVMa2DR0Pd6H37nqR7Yy/6dwB39aCXZSUsr5WpRKa
EopMNkR3v8m/Xba+DtiNIC72NtfFmZqj3tou/pSlcmhAiczCasIpHqGydVk3GAVq
JSlmodRpkwHF/vSRhhVmhpJHgI=
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.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
Authentication-Results: sourceware.org; auth=none
X-Virus-Found: No
X-Spam-SWARE-Status: No, score=3.3 required=5.0 tests=AWL,BAYES_50,FOREIGN_BODY,RCVD_IN_DNSWL_NONE autolearn=no version=3.3.2
X-HELO: mout.kundenserver.de
Message-ID: <539FE5D7.4090600@towo.net>
Date: Tue, 17 Jun 2014 08:53:11 +0200
From: Thomas Wolff <towo AT towo DOT net>
User-Agent: Mozilla/5.0 (Windows NT 6.1; rv:24.0) Gecko/20100101 Thunderbird/24.6.0
MIME-Version: 1.0
To: cygwin AT cygwin DOT com
Subject: Re: Change PS1 when running as administrator
References: <CAKf2h5TWGDwFj-wCav6Skqae+iaLHHtsGBWy1sS9v-PcaJxh3Q AT mail DOT gmail DOT com> <874mzkptd2 DOT fsf AT Rainer DOT invalid> <CAKf2h5RT-xFKyu3gxSnrw-_y-sxDefdJKYrCg4XOcRf0HZxvrw AT mail DOT gmail DOT com>
In-Reply-To: <CAKf2h5RT-xFKyu3gxSnrw-_y-sxDefdJKYrCg4XOcRf0HZxvrw@mail.gmail.com>
X-TagToolbar-Keys: D20140617085311444
X-IsSubscribed: yes

Am 16.06.2014 22:04, schrieb Frank Fesevur:
> 2014-06-16 21:06 GMT+02:00 Achim Gratz:
>> Frank Fesevur writes:
>>> When I run as administrator I change my PS1 from "$" to "#" with these
>>> line in ~/.bashrc.
>>>
>>> if id -Gn | grep -i Administrators > /dev/null
>> If anything I'd check for membership in group 544.  "Administrators"
>> surely is one of these strings that gets localized depending on the
>> phase of the moon or something.  I can't look right now, but I'm pretty
>> sure it says "Administratoren" in a german Windows version.
> On all my Dutch Windows all group names are localized apart from
> 544/Administrators.
I can confirm it is localized in German Windows (as I had been told 
myself when I proposed the same idea here 2 months ago:) ).
> # id
> uid=1000(Frank) gid=513(Geen)
> groups=513(Geen),0(root),544(Administrators),545(Gebruikers)
>
> But I agree checking the numeric value is better.
As Corinna had said. Yet, I'd like to check official documentation to 
confirm "544" is a constant for this purpose.
Other suggestions had been discussed (like checking something in 
/proc/something...).
Thomas

---
Diese E-Mail ist frei von Viren und Malware, denn der avast! Antivirus Schutz ist aktiv.
http://www.avast.com


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