X-Recipient: archive-cygwin AT delorie DOT com X-SWARE-Spam-Status: No, hits=-2.2 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Subject: RE: Set root shell prompt in /etc/profile ? Date: Fri, 4 Sep 2009 17:07:22 -0500 Message-ID: <786EBDA1AC46254B813E200779E7AD363B02F8@srv1163ex1.flightsafety.com> In-Reply-To: <4AA18DE9.50800@t-online.de> References: <4AA18DE9 DOT 50800 AT t-online DOT de> From: "Thrall, Bryan" To: 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 Christian Franke wrote on Friday, September 04, 2009 5:00 PM: > When running as member of admin group a Cygwin process normally has > root-like privileges. But this fact cannot be checked with 'geteuid() =3D=3D > 0'. The shell never sets the default root prompt '#', except if the user > is mapped to uid 0 in /etc/passwd. >=20 > Is there a generic way to set '#' via /etc/profile ? >=20 > The attached patch works for me on Cygwin 1.7., but it relies on a > runtime file write check. > (It also requires ACL support in /tmp and would not work on 1.5). >=20 > Is there a better way to do this? >=20 > Christian Perhaps `groups | grep Administrators` ? --=20 Bryan Thrall FlightSafety International bryan DOT thrall AT flightsafety DOT 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