Date: Sat, 11 Aug 2001 14:55:03 -0400 From: Garance A Drosihn <drosih@rpi.edu> To: Kris Kennaway <kris@obsecurity.org>, Jason Vervlied <jvervlied@hway.net> Cc: freebsd-current@FreeBSD.ORG Subject: Re: bash in /usr/local/bin? Message-ID: <p0510100fb79b2a85857c@[128.113.24.47]> In-Reply-To: <20010810233635.A12077@xor.obsecurity.org> References: <3B74D180.D036D629@hway.net> <20010810233635.A12077@xor.obsecurity.org>
next in thread | previous in thread | raw e-mail | index | archive | help
At 11:36 PM -0700 8/10/01, Kris Kennaway wrote: >On Sat, Aug 11, 2001, Jason Vervlied wrote: > > Is there a reason why the bash shell is kept in /usr/local/bin. > >Ports get installed under ${PREFIX} (/usr/local by default). > > > I would personally prefer to use it for my root shell, but > > if I remember right, root needs to have something that is > > in /bin (I could be wrong). > >You are wrong. ... And you ARE the weakest link! :-) Seriously though, it would be mighty prudent to have the shell for userid root to be in some directory which is part of the root filesystem. I suspect that very few people keep /usr/local in their root filesystem. So, while a shell doesn't need to be in /bin per se, that IS a pretty popular place to put any shell which someone expects to use as the default for userid root. As to Jason's situation, I also like to use bash as my shell even when I am root. However, I do not want to muck around with the port for 'bash', or do anything else to move where bash is or how it's built. So, the way I decided to handle it was to add the following lines in the /root/.login file: if ( -x /usr/local/bin/bash ) then # echo "Switching to bash" exec /usr/local/bin/bash -login endif So, strictly speaking /bin/csh is still the default shell for root, but the effect for me is that I automatically get bash whenever I log in. This seems to work fine for me, and I am not aware of any problems which have been caused by this trick in the few years that I have been using it. Another tactic Jason could take is to follow the example of userid 'toor'. So, create a new userid called 'broot', with uid=0 (so it should act like 'root'), but set it's shell to /usr/local/bin/bash. I don't have any idea how well this would work in practice, but it might be something else to try. -- Garance Alistair Drosehn = gad@eclipse.acs.rpi.edu Senior Systems Programmer or gad@freebsd.org Rensselaer Polytechnic Institute or drosih@rpi.edu To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?p0510100fb79b2a85857c>