Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 12 Dec 2000 10:02:46 -0000
From:      Daniel Bye <Daniel.Bye@uk.uu.net>
To:        'Cliff Sarginson' <cliff@raggedclown.net>, Doug Barton <DougB@FreeBSD.ORG>, questions@FreeBSD.ORG
Subject:   RE: Root and the C Shell
Message-ID:  <886CA0C095C5D411B95400508B6F741286606E@ukcamexch4.cam.uk.internal>

next in thread | raw e-mail | index | archive | help
I don't like csh either, and have never come to grief using
bash as my root shell (under FreeBSD.  Linux (RH of some kind)
was not so forgiving...)  I don't think there is anything that
requires root's shell to be a specific one (except dogma, aka
tradition).

If you need to start your machine in single user mode, then 
you will be prompted for which shell you would like to use.
The default is the tiny, statically linked /bin/sh.  Under
other systems that don't offer this choice, then there may
be valid arguments against changing root's shell.  But FreeBSD
is smart enough to get round it if it has been changed.

So ultimately, I think that it comes down to the personal
preferences of the users with root access.  If more than one
admin has the root password, leave it as csh or sh.  Or you
could always install sudo or super, or something similar, and
this discussion then becomes largely moot.

Dan

> -----Original Message-----
> From: Cliff Sarginson [mailto:cliff@raggedclown.net]
> Sent: 12 December 2000 08:17
> To: Doug Barton; Cliff Sarginson; questions@FreeBSD.ORG
> Subject: Re: Root and the C Shell
> 
> 
> > Cliff Sarginson wrote:
> > > 
> > > Hello,
> > > A simple question, I loathe and detest the C shell.
> > > Will anything break if I change root's login shell to
> > > be something (anything!) other than csh ?
> > 
> > 	The canonical answer to this question is that changing 
> it to /bin/sh is
> > ok, but changing it to something else not built with the 
> system is a bad
> > idea. Although, there are a lot of people who will tell you 
> that they do
> > it, so it's ok. Personally, I have changed all my users (root, and
> > unprivileged) to use /bin/sh as their shell, and in my 
> .profile's I have
> > this as the first line:
> > 
> > [ -x /usr/local/bin/bash ] &&
> >         exec /usr/local/bin/bash --rcfile $HOME/.bash_profile
> > 
> > It has saved my ass, or at least saved me lots of time 
> fixing stuff on
> > more than one occasion. I have talked to some truly 
> paranoid people who
> > do something like:
> > 
> > if /usr/local/bin/bash -version >/dev/null; then
> >         exec /usr/local/bin/bash --rcfile $HOME/.bash_profile
> > fi
> > 
> > I actually had one situation a long time ago where bash was 
> there, but
> > it wasn't runnable due to a library problem, so the above would have
> > helped. However, making changes like that takes me a long time to
> > propogate across machines, so I haven't bothered yet... 
> maybe it's time
> > for a .script spring, errr.. fall, ...errr... winter cleaning. :)
> 
> Ok, thanks for the reply.
> Obviously any root shell has got to be a statically linked binary
> otherwise you can get into problems in emergency situations.
> My question was really to find out if anything in the system relied on
> the root shell being csh - to save me having to find out the 
> hard way !
> 
> Personally the default of "csh" as the root shell is arcane and one
> of the hangover's from BSD that FreeBSD could do well to dump.
> There ought to be some sort of law against the C shell.. lol (ducks
> the flamethrowers!), what people do in their private lives is their 
> concern but public displays of the C shell I find quite 
> outrageous .. (hey
> guys that was a joke!)
> 
> Cliff
> 
> 
> 
> 
> 
> 
> To Unsubscribe: send mail to majordomo@FreeBSD.org
> with "unsubscribe freebsd-questions" in the body of the message
> 


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?886CA0C095C5D411B95400508B6F741286606E>