delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2011/04/25/07:32:14

X-Recipient: archive-cygwin AT delorie DOT com
X-SWARE-Spam-Status: No, hits=-2.3 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,RFC_ABUSE_POST,T_TO_NO_BRKTS_FREEMAIL
X-Spam-Check-By: sourceware.org
Date: Mon, 25 Apr 2011 13:31:49 +0200
From: David Sastre <d DOT sastre DOT medina AT gmail DOT com>
To: cygwin AT cygwin DOT com
Subject: Re: [PATCH] base-files-4.0.6: Change prompt if running with admin rights
Message-ID: <20110425113149.GA6959@jethro.local.lan>
References: <4D964392 DOT 6080809 AT t-online DOT de> <4DB45230 DOT 4080106 AT t-online DOT de>
MIME-Version: 1.0
In-Reply-To: <4DB45230.4080106@t-online.de>
User-Agent: Mutt/1.5.20 (2009-06-14)
X-IsSubscribed: yes
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT 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

--FL5UXtIhxfXey3p5
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Sun, Apr 24, 2011 at 06:39:12PM +0200, Christian Franke wrote:
> On 2011-04-01, Christian Franke wrote:
> >The attached patch for /etc/profile and /etc/bash.bashrc sets a
> >root prompt ('#' instead of '$' or '%') if the shell runs with
> >admin rights (local or domain admin group).

Trying to detect users with admin rights in order to provide some
enhancements is something I'd like to add to base-files, and has been
discussed before:

http://cygwin.com/ml/cygwin-apps/2011-02/msg00013.html

> If this patch is not accepted:
> Would it be possible to change /etc/profile such that PS1 is set
> before /etc/profile.d scripts are run?
> This would allow to change the prompt in a local /etc/profile.d
> script. This worked with the old base-files 3.9

This shouldn't be a problem. I'll look into it.
Another solution would be setting PS1 and/or PATH in the user's
.bashrc.

--=20
Huella de clave primaria: AD8F BDC0 5A2C FD5F A179  60E7 F79B AB04 5299 EC56

--FL5UXtIhxfXey3p5
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: Digital signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)

iF4EAREIAAYFAk21W6UACgkQ95urBFKZ7FaRVwD/f4D/imQPi16j+lY+2tnmWlCI
tsIUEaIhyC8D5vxTRuwA/1+DT9RZrlYf+Q9p+/aXjksHw9EO9fZc7eQKqq9xjEUB
=jRPs
-----END PGP SIGNATURE-----

--FL5UXtIhxfXey3p5--

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019