Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 15 May 1999 10:21:32 -0700
From:      Studded <Studded@gorean.org>
To:        stuyman@confusion.net, freebsd-questions@FreeBSD.ORG
Subject:   [Fwd: Re: How to change the shell?]
Message-ID:  <373DAD1C.6FA8766F@gorean.org>

next in thread | raw e-mail | index | archive | help
Laurence Berland wrote:
> 
> But it probably wouldnt be a bad thing if I were to copy TCSH into /bin
> and then not worry about Single user mode problems?

Here's a good example of why you should always leave root's shell as one
of the system shells. I recently upgraded my system from 2.2.8 to 3.2-beta.
Everything went well, make upgrade completed with no errors, and the system
came right up when I rebooted. The problem occured when I tried to log in
as my unpriviliged user who uses Bash. The libraries that it compiled
against were no longer where Bash thought they should be, and Bash refused
to start. I had to login as root, recompile Bash, then I was good to go. If
I had been doing that upgrade remotely, I would have been SOL because I
don't allow root logins. 

Now, it is possible that you could think of ALL of the possible ways that
you could be affected by changing the root shell, etc., etc., blah blah.
However, several really smart people have told you now that it's a bad
idea. Every unix system administration book you will ever read will also
tell you it's a bad idea. At some point, you will realize, it's a bad idea.
Whether you realize it now, or realize it after you've shot yourself in the
foot a few times is up to you. 

Now, Someone else already mentioned a much better idea, which is su -m. I
have a slightly more complicated and Bash-centric solution, I use the
following alias:

alias rootme='/usr/bin/su -m root --rcfile ${HOME}/.bashrc'

Ultimately, it's your system, do whatever you want with it. But please
stop trying to come up with reasons that changing root's shell might be a
good idea. It's not.

Good luck,

Doug

PS, It would be REALLY NICE if freebsd had some kind of "failover" mode for
the user's login shell so that if it is not executable login tries one or
both of the system shells... just a thought.


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?373DAD1C.6FA8766F>