no root login after changing shell
hogsett at csl.sri.com
Wed Aug 27 09:13:04 PDT 2003
> > 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 :
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)
More information about the freebsd-questions