Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 11 Nov 2008 06:38:54 +0100
From:      Polytropon <freebsd@edvax.de>
To:        Jim Pazarena <fquest@ccstores.com>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: root /etc/csh
Message-ID:  <20081111063854.fcad80f2.freebsd@edvax.de>
In-Reply-To: <4918CE42.3050504@ccstores.com>
References:  <20081110110805.GK1302@obspm.fr> <20081110161002.GA81960@gizmo.acns.msu.edu> <20081110203643.GH27646@obspm.fr> <200811102235.46971.fbsd.questions@rachie.is-a-geek.net> <Pine.GSO.4.63.0811102239200.846@hmacs.cmi.ua.ac.be> <4ad871310811101530p7b2baa0fk7f7b5118e314c11d@mail.gmail.com> <4918CE42.3050504@ccstores.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, 10 Nov 2008 16:13:54 -0800, Jim Pazarena <fquest@ccstores.com> wrote:
> Glen Barber wrote:
> > On Mon, Nov 10, 2008 at 4:46 PM, Pieter Donche <Pieter.Donche@ua.ac.be> wrote:
> >> FreeBSD 7.0 comes with the user root with start up shell /bin/csh
> >> As normal user I use bash (/usr/local/bin/bash installed)
> >> I would prefer to have bash also when working as root (su).
> > 
> > It is never recommended to change root's default shell to something
> > outside of the base install.
> > 
> > The main reason is, for example, if you update your non-base shell
> > (via ports), and it breaks, you can no longer log in as root.  If you
> > decide you still want to have a non-base shell for your root user,
> > keep root's shell default, and enable your toor user.
> 
> isn't the "main reason" because other shells may reside on a filesystem
> which isn't necessarily mounted in maintenance/single user mode? Or, libraries
> for the same?

At least, it's a valid reason. When in trouble, the system just
mounts / as ro where /bin/sh (the system's standard scripting
shell) and /bin/csh (its standard dialog shell) are available.
Bash may be on another partition that's not mounted yet, so no
maintenance access would be possible.

To change the shell, it's not a good idea to fiddle around with
/etc/passwd. The use of the chsh (change shell) command is advised.

In my opinion, you could add "bash" as the last line of your ~/.login
file which will be executed by csh, so bash starts up right after
login, but NB this may cause problems when using sudo.



-- 
Polytropon
>From Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...



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