From owner-freebsd-current@FreeBSD.ORG Sun Nov 18 23:44:42 2012 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 6C618D12 for ; Sun, 18 Nov 2012 23:44:42 +0000 (UTC) (envelope-from mjguzik@gmail.com) Received: from mail-wi0-f172.google.com (mail-wi0-f172.google.com [209.85.212.172]) by mx1.freebsd.org (Postfix) with ESMTP id EAA888FC14 for ; Sun, 18 Nov 2012 23:44:41 +0000 (UTC) Received: by mail-wi0-f172.google.com with SMTP id hj6so2758685wib.13 for ; Sun, 18 Nov 2012 15:44:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:cc:subject:message-id:mail-followup-to:references :mime-version:content-type:content-disposition:in-reply-to :user-agent; bh=iuYMEIW81n8yYM7Bu6frdV9VSdUPqcPrMRNyX2faZB8=; b=iQdcQa0SDRkLzqW6gfHnXmBxHFj6Lq3+izWjgYujE90arrYB05ROQji0kKoND+KBIv 0FjPwnUNVIPx9UAOsMOcaNzW247Uvjnu9GZ/CzNTidWO/8ayApcQbg0fzA62PGSdCzbP beoRXBbU4UFGLCvnzj1mVH7nOvbjfADaTO7VQr1ritCN+kI3M76dudCNTaFrZxf3al+t SeQjG5DRg1Tu4PA2Syi9Jvr4nlFwL7aBE3kZxR35LnUijCZMjrgbXwAaRYnv3GkrLhC4 vSu2xcDvriMOg7ZjWQxgDGCuh+8hqIA1M7yhNyPCzkJRaQbSyHa3CdDwvK4ZozJVNlfJ gGrA== Received: by 10.216.202.21 with SMTP id c21mr4173196weo.159.1353282280775; Sun, 18 Nov 2012 15:44:40 -0800 (PST) Received: from dft-labs.eu (n1x0n-1-pt.tunnel.tserv5.lon1.ipv6.he.net. [2001:470:1f08:1f7::2]) by mx.google.com with ESMTPS id i2sm11162254wiw.3.2012.11.18.15.44.36 (version=TLSv1/SSLv3 cipher=OTHER); Sun, 18 Nov 2012 15:44:39 -0800 (PST) Date: Mon, 19 Nov 2012 00:44:27 +0100 From: Mateusz Guzik To: Eitan Adler Subject: Re: prompt w/ uid 0 for cshrc Message-ID: <20121118234426.GA16628@dft-labs.eu> Mail-Followup-To: Mateusz Guzik , Eitan Adler , freebsd-current Current References: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.20 (2009-06-14) Cc: freebsd-current Current X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Nov 2012 23:44:42 -0000 On Sun, Nov 18, 2012 at 06:32:20PM -0500, Eitan Adler wrote: > Hey, > > at the moment the current default csh prompt looks like > > user@hostname:directory% command > > This leads to an unexpected[*] result when using su (without "-"). > > In particular the user part is *not* changed to "root" (or "toor" or > any other superuser indication) although the promptchar is changed to > "#". > This causes some confusion for new users and even some experienced ones. > > I worked around this issue by including the following > > if ($uid == 0) then > set user = root > endif > > which I'm not certain is a good idea. > > I would like to replace this with logic like > > if $uid = 0 AND $user != toor AND $user != root > set user = "+$user" > endif > > does anyone think this is a bad idea? can anyone propose a better > idea? Is the status quo okay? > Just take user name from id -nu. -- Mateusz Guzik