Set root shell prompt in /etc/profile ?
Thrall, Bryan
bryan.thrall@flightsafety.com
Fri Sep 4 22:07:00 GMT 2009
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
More information about the Cygwin
mailing list