This is the mail archive of the
cygwin
mailing list for the Cygwin project.
RE: Set root shell prompt in /etc/profile ?
- From: "Thrall, Bryan" <bryan dot thrall at flightsafety dot com>
- To: <cygwin at cygwin dot com>
- Date: Fri, 4 Sep 2009 17:07:22 -0500
- Subject: RE: Set root shell prompt in /etc/profile ?
- References: <4AA18DE9.50800@t-online.de>
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()
==
> 0'. The shell never sets the default root prompt '#', except if the
user
> is mapped to uid 0 in /etc/passwd.
>
> Is there a generic way to set '#' via /etc/profile ?
>
> 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).
>
> Is there a better way to do this?
>
> Christian
Perhaps `groups | grep Administrators` ?
--
Bryan Thrall
FlightSafety International
bryan.thrall@flightsafety.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