From owner-freebsd-questions@FreeBSD.ORG Sat Dec 20 20:32:27 2003 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5A31316A4CE for ; Sat, 20 Dec 2003 20:32:27 -0800 (PST) Received: from main.gmane.org (main.gmane.org [80.91.224.249]) by mx1.FreeBSD.org (Postfix) with ESMTP id B92A143D48 for ; Sat, 20 Dec 2003 20:32:24 -0800 (PST) (envelope-from freebsd-questions@m.gmane.org) Received: from list by main.gmane.org with local (Exim 3.35 #1 (Debian)) id 1AXvGR-0003RN-00 for ; Sun, 21 Dec 2003 05:32:23 +0100 X-Injected-Via-Gmane: http://gmane.org/ To: freebsd-questions@freebsd.org Received: from sea.gmane.org ([80.91.224.252]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1AXvGQ-0003RF-00 for ; Sun, 21 Dec 2003 05:32:22 +0100 Received: from news by sea.gmane.org with local (Exim 3.35 #1 (Debian)) id 1AXvGQ-00007R-00 for ; Sun, 21 Dec 2003 05:32:22 +0100 From: "Scott I. Remick" Date: Sat, 20 Dec 2003 23:32:21 -0500 Lines: 16 Message-ID: References: <3FE419F1.7851.51B6193@localhost> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Complaints-To: usenet@sea.gmane.org User-Agent: Pan/0.14.2 (This is not a psychotic episode. It's a cleansing moment of clarity.) X-Archive: encrypt Sender: news Subject: Re: bad root shell X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 21 Dec 2003 04:32:27 -0000 On Sat, 20 Dec 2003 09:44:17 -0800, Mark McConnell wrote: > An error in a pw* script inserted a non-existent shell into the password > database, effectively locking out root. > > I used a fixit disk to correct the problem, using this procedure: Unless I'm missing something, seems like the long way to do this. Last time I did this to myself, I did the following: 1) Log in as a user who can su to root. 2) Use su -m to su to root without changing your current shell 3) As root, use chpass -s to change your shell to a working one. Of course, this won't work if your only account is "root" or you don't have anyone else in the wheel group, so maybe it doesn't apply to you.