From owner-freebsd-current@FreeBSD.ORG Sun Nov 18 23:32:52 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 954DEB4E for ; Sun, 18 Nov 2012 23:32:52 +0000 (UTC) (envelope-from lists@eitanadler.com) Received: from mail-lb0-f182.google.com (mail-lb0-f182.google.com [209.85.217.182]) by mx1.freebsd.org (Postfix) with ESMTP id 0ECC18FC0C for ; Sun, 18 Nov 2012 23:32:51 +0000 (UTC) Received: by mail-lb0-f182.google.com with SMTP id go10so1476223lbb.13 for ; Sun, 18 Nov 2012 15:32:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=eitanadler.com; s=0xdeadbeef; h=mime-version:from:date:message-id:subject:to:content-type; bh=5Xc2lWjNHdOl8WYnoX3WRjE3NKI3j4ZOjYH61xaMMI4=; b=tU3UbqUpfK6Dj818U+3NVd8T4hfPGCnSZtlN+GPu9VUwWe3XEQ2SYuDnIgPAY76hnX NkOrrKU7Xd4oeob99QaX0Az2FzcVqSGJbAlFaJE8suE0VW7V195TStZnFRcRhr+p0IJq p0XlEH6smrAzVSYV8Sa5DprXGntW/h8+4kXPI= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:from:date:message-id:subject:to:content-type :x-gm-message-state; bh=5Xc2lWjNHdOl8WYnoX3WRjE3NKI3j4ZOjYH61xaMMI4=; b=Q59YK95y+OHMO9BYyv/gwAcPoLsYM+FQPh6XqHL6bWNUgjIoZgazsGqL5gKwHVp0KC xsguGIB9JLZbIDARvte+1RCdqSJSyLClYf8YiR1foMVHVvdlyeXrDX1MLeziTM2xBj33 xUZYFF2QgVe92BpAGdNY1gpjxphN9hvEol6+LxdFd1nF4hl1n9IsKSVNmpOTbd27UuuO LjqzExoqhhbqRZzCeSIDrlpfosNHyrW5C1054LulCibRuu75plFu1jWF7azRTUgGZxEL jC8QYh/VEVNcZo1d98irnJuUTSlQjTSEEq9bZyKxEGAX7It/Cy7ndgBn/5gFchShkZ+v ZEAQ== Received: by 10.112.103.136 with SMTP id fw8mr4530444lbb.18.1353281570449; Sun, 18 Nov 2012 15:32:50 -0800 (PST) MIME-Version: 1.0 Received: by 10.112.25.166 with HTTP; Sun, 18 Nov 2012 15:32:20 -0800 (PST) From: Eitan Adler Date: Sun, 18 Nov 2012 18:32:20 -0500 Message-ID: Subject: prompt w/ uid 0 for cshrc To: freebsd-current Current Content-Type: text/plain; charset=UTF-8 X-Gm-Message-State: ALoCoQnUMv33D+9qlKkW9UcXAUaOESG8kdCTMItgi8EtTCRQTh+1yjd9d+KGTDrfdwpfJi+Rvn9Q 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:32:52 -0000 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? I don't trust user education for this problem. I've seen way too many people get confused to leave the default without some extra indicator. [*] Okay, so this is expected if you understand the difference between "su" and "su -" but the defaults are not aimed at people that understand this difference. -- Eitan Adler