Date: Wed, 27 Aug 2003 09:13:00 -0700 From: Mike Hogsett <hogsett@csl.sri.com> To: "Charles Howse" <chowse@charter.net> Cc: freebsd-questions@freebsd.org Subject: Re: no root login after changing shell Message-ID: <200308271613.h7RGD0Fv019490@quarter.csl.sri.com> In-Reply-To: Message from "Charles Howse" <chowse@charter.net> of "Wed, 27 Aug 2003 10:57:11 CDT." <005a01c36cb3$e07d26f0$04fea8c0@moe>
next in thread | previous in thread | raw e-mail | index | archive | help
> > i wanted to change the shell for user root to bash. > > in the freebsd online handbook i found this command: > > > > # echo "/usr/local/bin/bash" >> /etc/shells > > > > > > but what i didnt know at this moment, that i have to install bash > > before. > > so i logged of as user root and get now on login the following error: > > > > su: /usr/local/bin/bash: No such file or directory > > > > can anybody please help me ... > > thanx > > Been there, done that, I sympathize with you. > The proper way to have done that would be: > Install bash > As root, type chsh > That will open vi, or your configured editor. > Then change the shell line to: /usr/local/bin/bash > > Alternately, you can, as root, type: > Chpass -s /usr/local/bin/bash root > This aviods opening vi and the editing I mentioned above. > > As far as recovering from this problem, I'm kinda a newbie myself, when > I did that, I finally re-installed. Maybe someone can point you to the > easy way to fix it. Reboot the machine. At the `boot:' prompt do : boot -s When it asks for a shell accept /bin/sh (or specify it) Mount all OS partitions (e.g. `mount -a -t ufs') Fix the password file. (us vipw if you can) reboot.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200308271613.h7RGD0Fv019490>