From owner-freebsd-current Sat Aug 11 12:46:34 2001 Delivered-To: freebsd-current@freebsd.org Received: from scaup.mail.pas.earthlink.net (scaup.mail.pas.earthlink.net [207.217.121.49]) by hub.freebsd.org (Postfix) with ESMTP id 3356037B409 for ; Sat, 11 Aug 2001 12:46:30 -0700 (PDT) (envelope-from tlambert2@mindspring.com) Received: from mindspring.com (dialup-209.245.135.88.Dial1.SanJose1.Level3.net [209.245.135.88]) by scaup.mail.pas.earthlink.net (EL-8_9_3_3/8.9.3) with ESMTP id MAA03847; Sat, 11 Aug 2001 12:46:22 -0700 (PDT) Message-ID: <3B758BB5.D529AA5F@mindspring.com> Date: Sat, 11 Aug 2001 12:47:01 -0700 From: Terry Lambert Reply-To: tlambert2@mindspring.com X-Mailer: Mozilla 4.7 [en]C-CCK-MCD {Sony} (Win98; U) X-Accept-Language: en MIME-Version: 1.0 To: Garance A Drosihn Cc: Kris Kennaway , Jason Vervlied , freebsd-current@FreeBSD.ORG Subject: Re: bash in /usr/local/bin? References: <3B74D180.D036D629@hway.net> <20010810233635.A12077@xor.obsecurity.org> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Garance A Drosihn wrote: > > 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. Add "setenv SHELL /usr/local/bin/bash", and only do your trick in the initial interactive login shell, and your logins will be faster, and you will get the "right" (for those definitions of "right" which include intentional use of "bash" 8-)) shell when you shell out of "vi" or other programs. -- Terry To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message