From owner-freebsd-questions Mon Dec 22 22:21:24 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.7/8.8.7) id WAA09231 for questions-outgoing; Mon, 22 Dec 1997 22:21:24 -0800 (PST) (envelope-from owner-freebsd-questions) Received: from kjsl.com (Limpia.KJSL.COM [198.137.202.3]) by hub.freebsd.org (8.8.7/8.8.7) with ESMTP id WAA09199 for ; Mon, 22 Dec 1997 22:21:16 -0800 (PST) (envelope-from javier@kjsl.com) Received: (from javier@localhost) by kjsl.com (8.8.5/8.8.5) id WAA01429; Mon, 22 Dec 1997 22:21:13 -0800 (PST) Date: Mon, 22 Dec 1997 22:21:13 -0800 (PST) Message-Id: <199712230621.WAA01429@kjsl.com> From: Javier Henderson MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit To: Ben Hockenhull Cc: Javier Henderson , freebsd-questions@freebsd.org Subject: Re: Shooting yourself in the foot In-Reply-To: References: <199712230350.TAA00998@kjsl.com> X-Mailer: VM 6.33 under Emacs 19.34.1 Sender: owner-freebsd-questions@freebsd.org X-Loop: FreeBSD.org Precedence: bulk Ben Hockenhull writes: > >Matthew D. Fuller writes: > > > On Mon, 22 Dec 1997, Joe "Marcus" Clarke wrote: > > > > > > > The way I fixed this when I did something similar was to take the system > > > > down to single user mode, `shutdown now`, then remount / as read/write, > > > > mount -u /, then edit /etc/shells to allow for /bin/false as a valid > > > > shell. Bring the system back up to multi-user and login as a user > > > > allowed to su to root. Then su to root using su -m, you should be able > > > > to issue a chsh root then. If you have no ther users in wheel, then > > > > instaed of editing /etc/shells, use vipw to edit the password file and > > > > change roots shell back to something else. > > > No need to shutdown. > > > Just do a su -m, then use vipw to set root's shell back to sh (or csh if > > > you're REALLY perverse ;). > > > > Well... > > > >bash-2.01$ su -m > >su: kerberos: not in root's ACL. > >Password: > >su: permission denied (shell). > > Well, IIRC, you need to specify the path to a shell with an su -m. > > like so: > > bash-2.01$ su -m /bin/sh Still not quite: bash-2.01$ su -m /bin/sh su: unknown login: /bin/sh