Dangers of using a non-base shell

Chuck Robey chuckr at chuckr.org
Fri Nov 9 12:58:20 PST 2007

Giorgos Keramidas wrote:
> On 2007-11-09 18:55, Andrew Pantyukhin <infofarmer at freebsd.org> wrote:
>> On Tue, Oct 30, 2007 at 01:39:12PM +0200, Giorgos Keramidas wrote:
>>> I've been using the following for some time:
>>>     keramida> su -
>>>     Password: ********
>>>     root# exec env SHELL=/usr/local/bin/bash bash -l
>> I know it doesn't work on slolaris^W some Unix flavors, but I've
>> been quite happy with "su -m".
> Heh, putting the Solaris bashing (sic) aside, I can see how the -m
> option can be useful some times.  After all, it was implemented because
> *someone* thought it would be neat to have around :-)

Actually, there's another reason that root should just stay with sh.  On 
a lot of systems, ones I have seen (and Linux is one of those), poor 
programming practices mean that many things will break if the root user 
isn't running sh (or in Linux's case, bash).  Ask folks, they'll claim 
it's untrue, but that's because they themselves run bash, and never saw 
the breakage.  I myself like tcsh, and the breakage is quite real, I 
finally had to give up using tcsh on those systems.  It's not a really 
strong reason for a FreeBSD user, but for those of us who work among a 
lot of OSes, it's better to get used to it, because you just can't fight 
city hall.  Trying to fix every single utility on those systems (which I 
did before I gave up trying) just means nightmares when you have to 
update stuff.

More information about the freebsd-questions mailing list