From owner-freebsd-questions@FreeBSD.ORG Sat Sep 27 14:44:26 2014 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3C70A7CB for ; Sat, 27 Sep 2014 14:44:26 +0000 (UTC) Received: from stangl.us (stangl.us [66.93.193.95]) by mx1.freebsd.org (Postfix) with ESMTP id 01B7E75F for ; Sat, 27 Sep 2014 14:44:25 +0000 (UTC) Received: from scout.stangl.us (localhost [127.0.0.1]) by scout.stangl.us (Postfix) with ESMTP id 69F1F1701E for ; Sat, 27 Sep 2014 09:39:19 -0500 (CDT) X-Virus-Scanned: amavisd-new at stangl.us Received: from stangl.us ([127.0.0.1]) by scout.stangl.us (scout.stangl.us [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id gPR_hAA5WpGC for ; Sat, 27 Sep 2014 09:39:18 -0500 (CDT) Received: by scout.stangl.us (Postfix, from userid 1001) id E1E621701A; Sat, 27 Sep 2014 09:39:18 -0500 (CDT) Date: Sat, 27 Sep 2014 09:39:18 -0500 From: Alex Stangl To: freebsd-questions@freebsd.org Subject: Re: pkg_delete bash, logged out by accident, can't ssh back in (not good) Message-ID: <20140927143918.GA7013@scout.stangl.us> Mail-Followup-To: freebsd-questions@freebsd.org References: <20140926210145.GA10084@neutralgood.org> <50075.166.147.100.43.1411770059.squirrel@cosmo.uchicago.edu> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 27 Sep 2014 14:44:26 -0000 On Fri, Sep 26, 2014 at 08:04:53PM -0400, firmdog@gmail.com wrote: > Didn't work. Thanks for the idea! > > But I just got home and happen to have a shell open from a laptop. So lucky > and fortunate that I had a shell open from home. Glad to hear you got it w/o much trouble. I just want to add a couple things to the good advice already shared here. It's good to keep a bootable DVD on-hand, for the same FreeBSD version you are running. You have the option of booting off the DVD, mounting the hard drive file systems, and then replacing the missing/corrupted files from the DVD. I'm paranoid about my login shell getting screwed up like this, and getting locked out. So I always keep my login shell set to /bin/sh or /bin/tcsh, and then switch over to whatever shell I actually want to use via a command like "exec mksh", either manually typed, or put into one of the shell startup files. If the alternative shell gets screwed up somehow, then you cannot exec it, but you're not locked out of the system. Alex