Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 4 Jan 2009 16:54:32 -0700
From:      Modulok <modulok@gmail.com>
To:        "David Christensen" <dpchrist@holgerdanske.com>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: FreeBSD 7.0-RELEASE-i386 will changing root shell break anything?
Message-ID:  <64c038660901041554x1935571fn65dae34fc1eef89e@mail.gmail.com>
In-Reply-To: <F763DD8CE6D8435981C4AE71F4C03983@p43400e>
References:  <F763DD8CE6D8435981C4AE71F4C03983@p43400e>

next in thread | previous in thread | raw e-mail | index | archive | help
> Does anybody know if it's okay to change the root shell?

A topic of debate, but yes it is okay to change the root shell, but
there are some things to know...

Some people fret about the idea that shells like bash are not on the
root partition and are usually dynamically linked to libraries which
reside on /usr and are therefore not available in single-user mode.
(One could install a static version of bash to avoid this.)
Additionally, FreeBSD prompts the user for the path to the desired
shell when going into single-user mode. Shells like sh and tcsh, while
dynamically linked, their libs reside on the root partition. If that
isn't enough, statically linked shells exist in /rescue and therefore
should always be available. Furthermore, the installation CD can be
booted from and can provide an emergency repair shell.

So yes, there is no technical reason you cannot change the root shell.
Just be aware that a default bash install will not be available in
single-user mode.

But... best security practices dictate that you should not be using
the root shell. If you're using the root shell often enough to find
the default shell inconvenient, you should consider using something
like sudo and a regular user account instead. You can use the builtin
'su' command with the '-m' flag to preserve the environment of the
current user, while elevating your privileges. The shell used will be
the login shell of the user issuing the 'su' command. Only members of
the group 'wheel' may issue the 'su' command.

-Modulok-

On 1/4/09, David Christensen <dpchrist@holgerdanske.com> wrote:
> freebsd-questions:
>
> I'm building a fresh Amanda server using FreeBSD 7.0-RELEASE-i386:
>
>
> http://portsmon.freebsd.org/portoverview.py?category=misc&portname=amand
> a-server
>
>
> Most of my software background is GNU/Linux.  I would prefer using the
> Bash shell, but the default FreeBSD shell for root appears to be the C
> shell:
>
>     p3450# echo $SHELL
>     /bin/csh
>
>
> I have changed the root shell to Bash on another machine I use as a CVS
> server and haven't noticed any issues yet, but I've been wondering if
> I'm setting myself up for problems by doing so.
>
>
> Does anybody know if it's okay to change the root shell on FreeBSD
> 7.0-RELEASE-i386?
>
>
> TIA,
>
> David
>
> _______________________________________________
> freebsd-questions@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-questions
> To unsubscribe, send any mail to "freebsd-questions-unsubscribe@freebsd.org"
>



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