From owner-freebsd-arch Tue Apr 18 8:57: 2 2000 Delivered-To: freebsd-arch@freebsd.org Received: from ns1.yes.no (ns1.yes.no [195.204.136.10]) by hub.freebsd.org (Postfix) with ESMTP id E38FB37BB73 for ; Tue, 18 Apr 2000 08:56:58 -0700 (PDT) (envelope-from eivind@bitbox.follo.net) Received: from bitbox.follo.net (bitbox.follo.net [195.204.143.218]) by ns1.yes.no (8.9.3/8.9.3) with ESMTP id RAA21982 for ; Tue, 18 Apr 2000 17:56:50 +0200 (CEST) Received: (from eivind@localhost) by bitbox.follo.net (8.8.8/8.8.6) id RAA01455 for freebsd-arch@freebsd.org; Tue, 18 Apr 2000 17:56:50 +0200 (CEST) Received: from atdot.dotat.org (atdot.dotat.org [150.101.89.3]) by hub.freebsd.org (Postfix) with ESMTP id 9771437B593; Tue, 18 Apr 2000 08:56:35 -0700 (PDT) (envelope-from newton@atdot.dotat.org) Received: (from newton@localhost) by atdot.dotat.org (8.9.3/8.9.3) id BAA03585; Wed, 19 Apr 2000 01:26:20 +0930 (CST) (envelope-from newton) Date: Wed, 19 Apr 2000 01:26:20 +0930 From: Mark Newton To: "Jeroen C. van Gelderen" Cc: Satoshi - Ports Wraith - Asami , Peter Wemm , Warner Losh , Poul-Henning Kamp , Brian Somers , "David E. O'Brien" , cvs-committers@freebsd.org, cvs-all@freebsd.org, freebsd-arch@freebsd.org Subject: Re: cvs commit: src/contrib/tcsh - Imported sources Message-ID: <20000419012620.C3348@atdot.dotat.org> References: <20000415231805.33B311CD7@overcee.netplex.com.au> <38FA4969.B3BF2DB2@vangelderen.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0i In-Reply-To: <38FA4969.B3BF2DB2@vangelderen.org>; from jeroen@vangelderen.org on Sun, Apr 16, 2000 at 07:14:49PM -0400 X-PGP-Key: http://slash.dotat.org/~newton/pgpkey.txt Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Sun, Apr 16, 2000 at 07:14:49PM -0400, Jeroen C. van Gelderen wrote: > So, assuming that we keep tcsh in the base system (why not, there's an > awful lot of people using it), we have: > 1. csh addicts typing chpass -s csh and be done with it > or > 2. frustrated new users trying to figure out that they need/want to > type > chpass -s sh Not trying to start a flame war here, but we can actually go a step further. Traditionally, an empty shell field in /etc/passwd has meant that /bin/sh is the user's shell. We can use that tradition to make the choice of shell more friendly. Here's the idea: 1. When new accounts are created, default to an empty shell field in their passwd file entry; 2. Modify the default /etc/profile so that it checks to see if the shell field is empty or not. If it is empty, present the user with a list of shells obtained from /etc/shells and ask them which one they want to use. Default to the shell saved in adduser.conf if nothing is entered, or /bin/csh if adduser.conf doesn't exist. 3. Based on their choice, run "chpass -s" to set the user's shell to whatever it is that they've wanted. 4. Tell the user that they'll now need to login again, then exit. Next time they login the test in (2) will see that the shell field is non-empty, and won't ask any stupid questions. That means the user is asked about which shell they want when they login for the first time, after that they won't be bothered again. Note that this only affects actual logins, because it'd be done out of /etc/profile, so most role accounts (which are typically accessed via "su", not via a login session) would continue to work in the same way they've always worked, but accounts which are actually used for real-live login sessions can be customized by the user when they login for the first time. Furthermore, if a site wishes to standardize on a certain shell, or if the sysadmin who sets up someone's account already knows their preference, that's ok too: the shell field can be preinitialized with whatever is supposed to go there. Note that this means that most current practices will remain unchanged; the only real change is that accounts with unspecified shells present a menu upon the first login (but not the first "su"). The only file which needs to be updated to achieve this outcome is /etc/profile. > What do the csh users think? Is typing "chpass -s csh" too much of an > inconvenience? For people who don't know about the chpass command, yes. So turn it into a "choose from the following options..." style of menu. - mark -------------------------------------------------------------------- I tried an internal modem, newton@atdot.dotat.org but it hurt when I walked. Mark Newton ----- Voice: +61-4-1620-2223 ------------- Fax: +61-8-82231777 ----- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message