From owner-freebsd-questions@FreeBSD.ORG Sat Sep 27 04:14:25 2014 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id AEAE6F25 for ; Sat, 27 Sep 2014 04:14:25 +0000 (UTC) Received: from mx02.qsc.de (mx02.qsc.de [213.148.130.14]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 633D5642 for ; Sat, 27 Sep 2014 04:14:24 +0000 (UTC) Received: from r56.edvax.de (port-92-195-183-7.dynamic.qsc.de [92.195.183.7]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx02.qsc.de (Postfix) with ESMTPS id 297A427711; Sat, 27 Sep 2014 06:14:15 +0200 (CEST) Received: from r56.edvax.de (localhost [127.0.0.1]) by r56.edvax.de (8.14.5/8.14.5) with SMTP id s8R4EFra002034; Sat, 27 Sep 2014 06:14:15 +0200 (CEST) (envelope-from freebsd@edvax.de) Date: Sat, 27 Sep 2014 06:14:15 +0200 From: Polytropon To: "firmdog@gmail.com" Subject: Re: pkg_delete bash, logged out by accident, can't ssh back in (not good) Message-Id: <20140927061415.8dbb62b5.freebsd@edvax.de> In-Reply-To: References: <20140926210145.GA10084@neutralgood.org> Reply-To: Polytropon Organization: EDVAX X-Mailer: Sylpheed 3.1.1 (GTK+ 2.24.5; i386-portbld-freebsd8.2) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: freebsd-questions@freebsd.org 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 04:14:25 -0000 On Fri, 26 Sep 2014 17:14:21 -0400, firmdog@gmail.com wrote: > Oh boy. I have only 2 accounts on this box. Root and one other > account. Both use bash as default. This why you (1st) don't change root's shell, and (2nd) introduce toor (also a UID 0 user) with a custom shell if you don't want csh as the default dialog shell. Using a non-system shell as a mandatory login shell often isn't a good idea if you don't have a "clever" failsave mechanism (for example an "emergency user" which has sufficient permissions to repair things when neccessary, but doesn't depend on 3rd party software at all). Still there are many users who state that "you simply don't change root's shell, and if you feel root should require bash, you're obviously doing something wrong." ;-) > I am completely locked out of this box on the command line? No, you could still start the box in single user mode (with a forced reboot) and use the maintenance shell to change the settings for the two users. After accepting /bin/sh as the emergency shell, use "chsh root" and "chsh " to set /bin/csh as the login shell. Then resume booting by typing "exit". From now on, you should be able to login again. -- Polytropon Magdeburg, Germany Happy FreeBSD user since 4.0 Andra moi ennepe, Mousa, ...