*BSD News Article 84391


Return to BSD News archive

Path: euryale.cc.adfa.oz.au!newshost.carno.net.au!harbinger.cc.monash.edu.au!ns.saard.net!news.camtech.net.au!news.adelaide.on.net!news.ade.connect.com.au!news.mel.connect.com.au!munnari.OZ.AU!news.ecn.uoknor.edu!feed1.news.erols.com!cpk-news-hub1.bbnplanet.com!news.bbnplanet.com!su-news-hub1.bbnplanet.com!news.pbi.net!ns2.qnis.net!not-for-mail
From: phil@router.qseps.qnis.net (Phil Jensen)
Newsgroups: comp.unix.bsd.freebsd.misc
Subject: Re: loss of root password
Date: 6 Dec 1996 08:07:02 -0000
Organization: QuadraNet Internet Services
Lines: 30
Message-ID: <588k76$11e@router.qseps.qnis.net>
References: <32A7AF66.49FF@li.net>
NNTP-Posting-Host: router.qseps.qnis.net

In article <32A7AF66.49FF@li.net>, Jeff Auerbach  <jauerbac@li.net> wrote:
>I changed my root shell to /bin/ksh not thinking at the time that the
>ksh was actually in /usr/local/bin.  Basically I cannot log in as root
>or su anymore because of the lack of shell.  How can I fix this without
>rebuilding the system.  I want my rootly powers back.
>
>
>Jeff Auerbach
>jauerbac@panix.com

You should be able to reboot your machine, and specify

Boot: -s

and boot into single-user mode.  It will ask you which shell you would like
to exec, or Enter for sh.  Just hit Enter, and then:

# mount -a -t nonfs

This will mount all of your drives except for your nfs ones.  Just type:

# chsh

And change your shell from /bin/ksh to /usr/local/bin/ksh, or setup a symbolic
link from /bin/ksh to /usr/local/bin/ksh.
-- 
Phil Jensen				QuadraNet Internet Services
Network Administrator / Manager		http://www.qnis.net
UNIX -is- user-friendly!  Its just picky about who its friends are.
Check out my Bourne Shell Tips Page!  http://www.qnis.net/~phil/faq.html