Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 7 Jan 2002 21:54:04 -0800
From:      "Philip J. Koenig" <pjklist@ekahuna.com>
To:        Michael Gratton <mike@vee.net>
Cc:        stable@FreeBSD.ORG
Subject:   Re: Using bash as default shell for root
Message-ID:  <3C3A18FC.13616.24E52F@localhost>
In-Reply-To: <3C3A3211.4050307@vee.net>

next in thread | previous in thread | raw e-mail | index | archive | help
On 8 Jan 2002, at 10:11, Michael Gratton boldly uttered: 

> Philip J. Koenig wrote:
> 
> > 
> > Which brings me to: can anyone provide any insight as to what 
> > possible problems one might encounter if one were to do just this: 
> > statically compile bash, put it in /bin, make it root's default 
> > shell, and use it during single-user mode?
> 
> 
> Why don't you just use the "toor" user - the "Bourne-again super user"; 
> that is what it is there for. Set toor's shell to be bash and leav 
> root's shell alone. When you need to do any work as root, do a `su toor` 
> instead of just a `su`. When you're in single user mode, you'll default 
> to using root and you won't have any problems (apart from using a 
> non-bash shell for maintenance and emergency work).
> 
> Another alternative would be to use sudo, which also neatly circumvents 
> the problem.
> 
> I've used both mechanisms, and have been quite happy with them. I'm 
> tending to use sudo more than toor these days, mostly because it's more 
> convenient for me, secure, etc.
> 
> Mike.


Those ideas don't really do anything for me in single-user mode, 
which is really one of the main things I'm trying to accomplish: 
consistent shell no matter what situation.

Currently for regular users I use bash, root defaults to csh under 
normal circumstances and sh in single-user mode. (although I could 
change to anything else residing in bin in single-user mode, the main 
alternative is tcsh/csh which I'm not a great fan of)

The main issue here was that bash traditionally isn't available in 
single-user mode because /usr isn't mounted when root gets its first 
shell prompt.  Statically linking bash, copying it to /bin and 
updating /etc/shells solves the 1st problem, but it won't get updated 
as the rest of the system (or the bash port) does.  And I wasn't sure 
there were any other issues to using bash as root's default shell. 
(besides the fact that it's GPL, which is why it will probably never 
become part of the base system)



--
Philip J. Koenig                                       pjklist@ekahuna.com
Electric Kahuna Systems -- Computers & Communications for the New Millenium


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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3C3A18FC.13616.24E52F>