bad root shell

Scott I. Remick scott at sremick.net
Sat Dec 20 20:32:27 PST 2003


On Sat, 20 Dec 2003 09:44:17 -0800, Mark McConnell wrote:

> An error in a pw* script inserted a non-existent shell into the password
> database, effectively locking out root.
> 
> I used a fixit disk to correct the problem, using this procedure:

Unless I'm missing something, seems like the long way to do this. Last
time I did this to myself, I did the following:

1) Log in as a user who can su to root.
2) Use su -m to su to root without changing your current shell
3) As root, use chpass -s to change your shell to a working one.

Of course, this won't work if your only account is "root" or you don't
have anyone else in the wheel group, so maybe it doesn't apply to you.



More information about the freebsd-questions mailing list