From owner-freebsd-questions@FreeBSD.ORG Thu Oct 19 23:39:25 2006 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 45C9816A416 for ; Thu, 19 Oct 2006 23:39:25 +0000 (UTC) (envelope-from elessar@bsdforen.de) Received: from mail.bsdforen.de (bsdforen.de [212.204.60.79]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2879443D7F for ; Thu, 19 Oct 2006 23:39:16 +0000 (GMT) (envelope-from elessar@bsdforen.de) Received: from loki.starkstrom.lan (p549CF836.dip.t-dialin.net [84.156.248.54]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.bsdforen.de (Postfix) with ESMTP id BB73442410B for ; Fri, 20 Oct 2006 01:39:14 +0200 (CEST) Date: Fri, 20 Oct 2006 01:38:33 +0200 From: Joerg Pernfuss To: freebsd-questions@freebsd.org Message-ID: <20061020013833.35ae8f1b@loki.starkstrom.lan> In-Reply-To: <200610191303.k9JD322j081114@dc.cis.okstate.edu> References: <200610191303.k9JD322j081114@dc.cis.okstate.edu> X-Mailer: Sylpheed-Claws 2.2.3 (GTK+ 2.8.20; i386-portbld-freebsd6.1) Mime-Version: 1.0 Content-Type: multipart/signed; boundary="Sig_Cyq/M_VRFj9JZz0hTO.G8yt"; protocol="application/pgp-signature"; micalg=PGP-SHA1 Subject: Re: Why csh on Root? X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Oct 2006 23:39:25 -0000 --Sig_Cyq/M_VRFj9JZz0hTO.G8yt Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable On Thu, 19 Oct 2006 08:03:02 -0500 Martin McCormick wrote: > Is there any particular reason why FreeBSD has csh as the > default root shell? Nothing really wrong with it except that I > quit using csh about twelve years ago and so am a little rusty > about the finer details when I come across a csh shell. On a > number of FreeBSD4.x systems, I used chsh to change root's shell > after installing bash and the only thing I noticed was that one > should be careful of the $PATH variable and make sure it at least > hits all the same directories in the same order. Other than > that, it worked. >=20 > On a recent upgrade to 5.4, I noticed the C shell is > still default so I figured I would ask before changing it so as > not to introduce hidden problems later. Basically, I like bash > better and also add a couple more paths such as /usr/local/etc > for home-grown applications. >=20 > Thanks for your thoughts. On first look, FreeBSD seems to come with 3 shells: sh, csh and tcsh Then again, that is not entirely true. /bin/sh is actually an ash. Minimal POSIX sh with a few additions that don't help it anyway near a friendly shell for interactive use. Then csh and tcsh - they are one and the same, a tcsh. 25183 -r-xr-xr-x 2 root wheel 333980 5 Sep 16:12 /bin/tcsh* 25183 -r-xr-xr-x 2 root wheel 333980 5 Sep 16:12 /bin/csh* ^^^^^ ^ same inode link count 2 The reasons for that are many. - csh is the shell that originated in Berkeley (legacy reason) - bash isn't quite released unter a two-clause BSDL, which isn't desireable as a part of the base (license reason) - in case of a system failure, the root shell should work (single user reason) - everybody that works a lot on the shell with modify his environment anyway to his personal preference (why-bother reason) - probably more Neither of these are by itself 100% convincing and you can construct a "yeah but if..." without any problems. But everyone of these reasons is by itself able to start one ceremonial bikeshed unlike anything known to man so far. Therefor, one could describe the status quo as a truce. The elephant that everybody sees and noone talks about. The chance of getting a really broad concensus on these topics is so slim, that it simply isn't touched. Especially since it isn't broken. One can add bash3, ksh93, zsh, ... to the system via ports and these work. One can use toor and asign that user a different shell. One can simply use `sudo bash' instead of normal `su'/`su -l'. The one instance where one really needs the root csh is in case of a rather bad system failure. And an unfamiliar scripting syntax is one's least problem in that case anyway. So, either chsh to /usr/local/bin/bash and use plain /bin/sh in single user situations, or make a statically compiled /bin/bash. If one is prepared for eventual fallout, the possibilities endless. Joerg --=20 | /"\ ASCII ribbon | GnuPG Key ID | e86d b753 3deb e749 6c3a | | \ / campaign against | 0xbbcaad24 | 5706 1f7d 6cfd bbca ad24 | | X HTML in email | .the next sentence is true. | | / \ and news | .the previous sentence was a lie. | --Sig_Cyq/M_VRFj9JZz0hTO.G8yt Content-Type: application/pgp-signature; name=signature.asc Content-Disposition: attachment; filename=signature.asc -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2.2 (FreeBSD) iD8DBQFFOAyBH31s/bvKrSQRArvYAKCE0RYAkNDA9RoxmnhW5Oyv5RXo8ACeND+D rGVkycOK24zsChiT444clSY= =Zhl1 -----END PGP SIGNATURE----- --Sig_Cyq/M_VRFj9JZz0hTO.G8yt--