Changing root's shell

Ross Penner ross.penner at gmail.com
Wed Aug 9 00:02:11 UTC 2006


On 8/8/06, Pete Slagle <freebsd-questions at voidcaptain.com> wrote:
>
> Ross Penner wrote:
>
> > how do you drop to single user mode? I just know how to get there at
> > boot time.
> >
> > Thanks.
> >
> > On 8/8/06, *Pete Slagle* < freebsd-questions at voidcaptain.com
> > <mailto:freebsd-questions at voidcaptain.com>> wrote:
> >
> >     ross wrote:
> >
> >     > so it seems changed root login's shell to /usr/bin/bash which
> doesn't
> >     > exist. now I can't login to root at all. Oh yes, sudo isn't
> >     installed. How
> >     > would you grand masters of FreeBSD fix my embarrasing mistake.
> >
> >     Dunno if any grand masters are about, but maybe I can help with this
>
> >     one.
> >
> >       - drop to single user mode: `shutdown now`
> >       - when prompted for a shell, type /bin/sh
> >       - `vipw /etc/passwd` and (carefully) change root's shell to
> /bin/sh
> >       - type `exit` at the shell prompt to return from single user mode
>
> Normally you just do what I said, `shutdown now` as root, but I guess
> you can't do that in your situation. (Silly me.) So just reboot into
> single user mode instead, and follow the rest of the steps.
>
> Good luck,
> Pete
>
> interestingly, by hitting the power button on the front, it went through
the shutdown process without root permissions.

I followed your steps but the problem remains. The /etc/passwd file is
edited but I still can't logon as root. When I changed the shell initially,
I used chpass. I
also tried changeing the /etc/master.passwd file to no avail.


More information about the freebsd-questions mailing list