From owner-freebsd-questions@FreeBSD.ORG Tue Oct 30 15:12:37 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 228EA16A41A for ; Tue, 30 Oct 2007 15:12:37 +0000 (UTC) (envelope-from erik@cepheid.org) Received: from mail.cepheid.org (aleph.cepheid.org [72.232.60.94]) by mx1.freebsd.org (Postfix) with ESMTP id F165913C49D for ; Tue, 30 Oct 2007 15:12:36 +0000 (UTC) (envelope-from erik@cepheid.org) Received: by mail.cepheid.org (Postfix, from userid 1006) id BA2549B4058; Tue, 30 Oct 2007 10:14:27 -0500 (CDT) Date: Tue, 30 Oct 2007 10:14:27 -0500 From: Erik Osterholm To: Stephen Allen Message-ID: <20071030151427.GB62728@aleph.cepheid.org> Mail-Followup-To: Erik Osterholm , Stephen Allen , FreeBSD Questions References: <472647A0.3030009@brookes.ac.uk> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <472647A0.3030009@brookes.ac.uk> User-Agent: Mutt/1.4.2.3i Cc: FreeBSD Questions Subject: Re: Dangers of using a non-base shell X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Oct 2007 15:12:37 -0000 On Mon, Oct 29, 2007 at 08:50:40PM +0000, 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. I've only ever heard this advice applied to the root account. Generally speaking, I keep my root accounts using /bin/csh and I run (z|k)sh on my user accounts. If something were ever to break, I'd just log in as root to fix it. > The quite annoying side-effect is having to type 'exit' twice to get out > of a su shell or screen. For screen, you can just change the SHELL environment variable before you run it: SHELL=/usr/local/bin/pdksh screen New screen windows will use the new shell. For a more permanent fix, you can add e.g. "shell /usr/local/bin/pdksh" to your .screenrc file. > 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? There was a pretty long thread on this here: http://lists.freebsd.org/pipermail/freebsd-questions/2007-October/159670.html Another issue that you'll have to contend with is that if your filesystem on which bash lives fails to mount, you'll be in the same boat. You could copy it to /bin (which is usually on the same filesystem as / and /boot, meaning you're almost guaranteed to have it, even if other filesystems fail to mount) but I don't like cluttering up my filesystem. > Many thanks, > Steve Erik