From owner-freebsd-questions@FreeBSD.ORG Fri Nov 9 15:56:08 2007 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4AD0C16A420 for ; Fri, 9 Nov 2007 15:56:08 +0000 (UTC) (envelope-from sat@cenkes.org) Received: from heka.cenkes.org (heka.cenkes.org [208.79.80.110]) by mx1.freebsd.org (Postfix) with ESMTP id 10C5713C4AA for ; Fri, 9 Nov 2007 15:56:08 +0000 (UTC) (envelope-from sat@cenkes.org) Received: from amilo.cenkes.org (ppp91-76-104-15.pppoe.mtu-net.ru [91.76.104.15]) (Authenticated sender: sat) by heka.cenkes.org (Postfix) with ESMTP id 960A1242F833; Fri, 9 Nov 2007 18:56:01 +0300 (MSK) Date: Fri, 9 Nov 2007 18:55:59 +0300 From: Andrew Pantyukhin To: Giorgos Keramidas Message-ID: <20071109155558.GF8728@amilo.cenkes.org> References: <472647A0.3030009@brookes.ac.uk> <20071030113912.GB3941@kobe.laptop> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20071030113912.GB3941@kobe.laptop> X-OS: FreeBSD 8.0-CURRENT amd64 User-Agent: Mutt/1.5.16 (2007-06-09) Cc: freebsd-questions@freebsd.org Subject: Re: Dangers of using a non-base shell X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: infofarmer@FreeBSD.org List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Nov 2007 15:56:08 -0000 On Tue, Oct 30, 2007 at 01:39:12PM +0200, Giorgos Keramidas wrote: > On 2007-10-29 20:50, Stephen Allen wrote: > > It's been drawn to my attention not to use bash from the ports > > collection, because if one of it's dependencies (gettext or libiconv) > > fails or is updated significantly, it could break, and prevent > > login. The suggested solution was to use a base shell (such as sh) and > > append 'bash -l' to .shrc to automatically enter bash. > > > > The quite annoying side-effect is having to type 'exit' twice to get > > out of a su shell or screen. > > > > Would it be a better idea to use the pre-compiled binary for bash? > > And if I did so, could I be alerted to updates as easy as using > > 'pkg_version -v' when checking if any ports need updating? > > I've been using the following for some time: > > keramida> su - > Password: ******** > root# exec env SHELL=/usr/local/bin/bash bash -l I know it doesn't work on slolaris^W some Unix flavors, but I've been quite happy with "su -m". It changes workflow in many ways, but once you get a handle of it, it can really be useful. E.g. my zsh history is shared between root and the user who su'd into him. And if anything goes wrong, I just drop the -m key. It's another story when it comes to remote login (non-root)...