I have a FreeBSD box which I forgot the root password to. I do have physical access, so I can reboot the box if I need to.
How do I reset my password?
I have a FreeBSD box which I forgot the root password to. I do have physical access, so I can reboot the box if I need to.
How do I reset my password?
There are a few Steps needed:
Start the server
Press Enter key at boot loader to get to the boot menu
Press Space to pause the default boot loading
Boot into single user mode (press 4)
Define Shell : enter the full pathname for the shell (or press enter for default path /bin/sh)
remount root file system (/) rw (read/write)
mount -u /
mount -a
Create a new Password with
passwd
boot multi user OR reboot
8a multi-user
exit
8b. reboot
sync
reboot
Source: