February 13, 2004
Recovering forgotten root password
How to reset the root password if you forget it: First, reboot the machine into single user mode. You do this by hitting space when FreeBSD says to "Hit [Enter] to boot immediately or any other key for command prompt", leaving you with the very cryptic "ok " prompt. Then type in :ok boot -sOnce it finishes booting, then you can do:
# mount -u / ... mount root file system read/writeThis is all courtesy of the Complete FreeBSD book, by Lehey. I particularily love the chapter where he goes over the boot screen line by line, telling you what FreeBSD is doing.
# mount /usr ... mount /usr file system (if seperate)
# passwd root .... change the password for root
Enter new password:
Enter password again:
# ^D ... enter ctrl-D to continue with startupbr>
del.icio.us | Digg it | Furl | Yahoo MyWeb | Create Social Bookmark Links
Posted by jdarnold at 07:46 AM | TrackBack
Track with co.mments
Track with co.mments This is good when in /etc/ttys console is declared secure. You get stuck when /etc/ttys has console as insecure. In that case boot with install cd (only IDE cdrom worked in my case - no usb) than go to post install config -> fixit option -> use the live cd. Once your are in fixit console mount the HD and change console entry in /etc/ttys to secure, Reboot and than go single user mode as explained above and follow.
Have fun
-Yantragna
Posted by: Yantragna on November 9, 2004 11:45 PM


