Date: Mon, 20 Dec 2004 11:53:35 -0600 From: "Micheal Patterson" <micheal@tsgincorporated.com> To: "Joshua Lokken" <joshua.lokken@gmail.com>, "David Landgren" <david@landgren.net> Cc: freebsd-questions@freebsd.org Subject: Re: bash - superuser Message-ID: <03fe01c4e6bc$d5f37980$4df24243@tsgincorporated.com> References: <41C6AC75.6020608@uol.com.br> <41C6B7A1.1090708@landgren.net> <bc5b638504122009047a4f32ad@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
----- Original Message ----- From: "Joshua Lokken" <joshua.lokken@gmail.com> To: "David Landgren" <david@landgren.net> Cc: <freebsd-questions@freebsd.org> Sent: Monday, December 20, 2004 11:04 AM Subject: Re: bash - superuser > On Mon, 20 Dec 2004 12:29:37 +0100, David Landgren <david@landgren.net> wrote: > > Giuliano Cardozo Medalha wrote: > > > Hi, > > > > > > I have a machine with FreeBSD 5.3 - release -p2. > > > > > > I have installed bash from ports. > > > > > > How is possible to use bash in root account ? > > > > > > Thanks a lot > > > > Don't. > > > > Leave /bin/sh as your shell. > > 'Leave' /bin/sh as your shell makes it sound like /bin/sh is the > default root shell. Did this change in FreeBSD 5.x? It appears > that in 4.x, the root shell is /bin/csh by default, which [I believe] > is linked to /bin/tcsh. > > > -- > Joshua Lokken > Open Source Advocate csh is still the default root shell. At one time, systems required multiple drives due to space. So, these systems would have a partioning scheme such as: hda0 - / hda1 - /var hda2 - /swap hda3 - /usr ... and so on depending on their drive capacity at the time. Please keep in mind that this OS (and it's ancestors) were running on systems that had multiple drives with 20mb or less in their day. The tree has constantly grown from those days. As such, many admins use this scheme today because they either have used this scheme for 10's of years and don't wish to change their ways. Personal and/or financial reasoning aside as to why they don't wish to change is totally their decision. Even so, there are some good points to this methodology. It provides the ability to not lose the entire system in the event of drive failure. In this method, having the root shell on another partition invites failure for the entire system should root's shell reside on a crashed / failed partition. No root, no repair capability. On the other hand, many admins use a system with a single drive in them and use NIS/NFS as their userland drive space. Some may even have /usr/ itself fed from NFS. In either method, if you want to use anything other than csh, you will need to move it to /bin. You want it to be uncorruptable in the event of breach. So, if you still wish to use bash as the root shell, copy the executable into /bin, add it to /etc/shells, and set it immutable ("chflags schg /bin/bash") so that in the event of breach, the shell is still unable to be modified and will be reachable in the event of NFS or partition failure. With the state of drives, raid arrays, etc in todays world, either way will work just as good as the other. Each person has their own preferences for their own reasons. -- Micheal Patterson Senior Communications Systems Engineer 405-917-0600 Confidentiality Notice: This e-mail message, including any attachments, is for the sole use of the intended recipient(s) and may contain confidential and privileged information. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender by reply e-mail and destroy all copies of the original message.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?03fe01c4e6bc$d5f37980$4df24243>