Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 2 Jun 1998 00:16:50 -0400
From:      Matthew Hunt <mph@pobox.com>
To:        Marco Shaw <marco@nbnet.nb.ca>, freebsd-questions@FreeBSD.ORG
Subject:   Re: HELP! no shell
Message-ID:  <19980602001650.A16221@flarn.dyn.ml.org>
In-Reply-To: <000201bd8db4$9788da40$0a22a10a@ipo10161034010.nbtel.net>; from Marco Shaw on Mon, Jun 01, 1998 at 08:25:41PM -0300
References:  <000201bd8db4$9788da40$0a22a10a@ipo10161034010.nbtel.net>

Next in thread | Previous in thread | Raw E-Mail | Index | Archive | Help
On Mon, Jun 01, 1998 at 08:25:41PM -0300, Marco Shaw wrote:

> I just installed my system today.  I prefer the BASH shell, so I immediately
> changed my shell (root) to BASH.  I presumed that it was in /bin/bash and
> already installed, BUT it wasn't.  Now I can't login as root, I just get
> kicked back to the login prompt, and I can't 'su' to root because the groups
> aren't setup right!

Reboot the machine.  At the "Boot:" prompt, type "-s" to boot in
single user mode.  You will be asked for a shell; accept the default
of "/bin/sh".

At the prompt, do the following:

# fsck -p			(In case the filesystems are unclean)
# mount -a			(Mount the filesystems)
# TERM=cons25 export TERM	(your editor will want this)
# chsh				(Change shell; choose /bin/sh)
# shutdown -r now		(Reboot)

Lessons to be learned:

(a) FreeBSD is not Linux; as far as I know, only Linux ships bash in
    /bin.

(b) When changing something that will affect root's ability to login
    (shell, password, etc.) keep a root shell open until you have logged
    in with the new setting.

(c) This question has probably been answered before.  Certainly the
    similar problem of forgetting root's password has been.  If you
    did not consult the mailing list archives at www.freebsd.org
    (under "Search") you should do so in the future.

Regards,
Matthew

-- 
Matthew Hunt <mph@pobox.com> * Stay close to the Vorlon.
http://www.pobox.com/~mph/pgp.key for PGP public key 0x67203349.

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message



Want to link to this message? Use this URL: <http://docs.FreeBSD.org/cgi/mid.cgi?19980602001650.A16221>