Why reccomend Bash shell?

Louis LeBlanc FreeBSD at keyslapper.org
Thu Dec 16 06:00:50 PST 2004


On 12/16/04 11:11 AM, Matthew Seaman sat at the `puter and typed:
> Adam wrote:
> > In Greg Lehey's book "The Complete FreeBSD" he reccomends changing
> > the default shell for users to bash shell. -p. 94
> > 
> > What are the Pro's/Con's of using bash as opposed to the other
> > shells?
> 
> On point that no one has mentioned on this list yet is that it is a
> good idea to have root's shell be entirely contained on the root
> partition of the system -- ie. not just the executable, but any shlibs
> it requires as well.  There's been a thread over on freebsd-ports at ...
> about ppp(8) apparently failing because of problems linking libintl --
> which actually turned out to be because root's shell had been changed
> to bash(1).

Gah!  That happened to me too!  Couldn't find the exact cause though.
Now I know.  Thanks!

Looks like root is getting a facelift.

> That's why there is a 'toor' account -- you can use whatever shell you
> like with that a/c and not fear mucking up important bits of the
> system.

Also good to know.  I've gotta find out if Grog mentions anything about
that in The Book.

> On the other hand, I take the view that the less done by the super
> user the better, and discourage myself to use sudo(1) preferentially
> and to keep su(1) sessions as short as possible by making root's shell
> as /unfriendly/ as possible.

Definitely a good practice I've been threatening to start myself.  I
generally have several root xterms open in my X login, and even though I
habitually lock my screen, I know it's "A Bad Thing To Do".

> You could even go as far as Solaris does, where the root shell is
> /sbin/sh -- a statically linked cut down version of the standard
> Bourne shell that's got the best chance of still working even on a
> severely banjaxed system.  In FreeBSD terms, that would equate to
> using /rescue/sh -- mind you although that's statically linked, it's
> still a fully capable version of /bin/sh.

Banjaxed?  Is that a new word for "Seriously Hosed"?  I like it. :)

Those of us that live in denial regarding the reliability of Our Own
Machines tend not to worry about that.  Of course, more than one of us
has shown up on this very list with sheepish grins all over our pleas
for help.  Myself included.  Standard subject lines are "What have I
done?" and "I've done it, now how do I undo it?" and the ever
descriptive "Oops" and "Oh crap".

Matthew, I am sincerely glad to have read your response here.  You've
provided valuable advice to me specifically in the past, and I'm sure
this ranks as one of the more enlightening ones.  I'm going to install
sudo on my systems right now, and change the root shell back to /bin/sh.

I'm also going to break down and check out some of the other shells.
I've been with Bash since my Linux days (geez, 4+ years ago now), and I
guess it's time to try something new.  Call it a New Years Resolution.

Thanks a lot!

Lou
-- 
Louis LeBlanc               FreeBSD at keyslapper.org
Fully Funded Hobbyist, KeySlapper Extrordinaire :)
http://www.keyslapper.org                     Ô¿Ô¬

Wrinkles should merely indicate where smiles have been.
    -- Mark Twain


More information about the freebsd-questions mailing list