From owner-freebsd-questions Tue Jun 27 11:13:58 2000 Delivered-To: freebsd-questions@freebsd.org Received: from cerebro.xu.edu (CEREBRO.XU.EDU [205.133.160.240]) by hub.freebsd.org (Postfix) with ESMTP id 0499E37C1E4 for ; Tue, 27 Jun 2000 11:13:54 -0700 (PDT) (envelope-from lewandow@cerebro.xu.edu) Received: from cerebro (cerebro [205.133.160.240]) by cerebro.xu.edu (8.9.3/8.9.3) with ESMTP id OAA11535; Tue, 27 Jun 2000 14:23:43 -0400 (EDT) (envelope-from lewandow@cerebro.xu.edu) Date: Tue, 27 Jun 2000 14:23:43 -0400 (EDT) From: Gary Lewandowski To: worldly BSD Cc: freebsd-questions@FreeBSD.ORG Subject: Re: unable to login after changing shell as root In-Reply-To: <20000627152856.23632.qmail@web5305.mail.yahoo.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG > > worldly BSD wrote: > > > while reading the handbook i decided to change my > > > shell by following the example > > > > > > " % chsh -s /usr/local/bin/bash" [Large clunking sound of "no such file or directory" that locks him out deleted...] > --- Christoph Sold suggested: > > % su > > Password: > > # chsh -s /bin/sh > > # cd /usr/ports/shells/bash > > # make all install clean > > [snip] > > # ^D > > % su - > > bash-2.0# > > > > Alternatively, use the toor account to change roots' > > shell back to > > /bin/sh. But, On Tue, 27 Jun 2000, worldly BSD wrote: > your example assumes that i made another user account. Ouch, bet that hurts. :-) I thought toor was always added with a default install, but maybe not... I have a long and tedious method that might work to solve this: 1) install FreeBSD on another system (or drive). If you have the distribution, the second CD has a live filesystem that will work (assuming your machine boots CDs). 2) boot the working system and then mount your current system to someplace like /mnt 3) edit /etc/passwd and /etc/master.passwd files to use the correct path for the shell. By the way, chsh gives a warning if the shell doesn't exist. Double ouch! gary =========================================================================== Gary Lewandowski lewandow@cerebro.xu.edu http://cerebro.xu.edu/~lewandow Xavier University Mathematics and Computer Science =========================================================================== To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message