Recovering from lost root password in OpenBSD

Want to recover a lost root password in OpenBSD, type boot -s at the boot prompt in OpenBSD hit enter when prompted for shell and enter vt220 as the TERM.

boot> boot -s
Enter pathname of shell or RETURN for sh:
Enter Terminal: vt220

Next run an fsck on the root filesystem and mount it read-write. If you have a seperate /usr filesystem then you should also mount it read-write. Finally run the passwd command to change the password.

# fsck /
# mount -uw /
# passwd
This entry was posted in FLOSS and tagged , . Bookmark the permalink.

Leave a Reply