How To Reset Or Recover Root Password On OPNsense? So for some reason you just forgot the root password for your OPNsense router/firewall and you are now locked out and don’t know what to do!!? Relax as in this article, we will show you How To Reset Or Recover Root Password On OPNsense from single user mode.
You can also check our previous guide on how to install OPNsense Firewall on VirtualBox.
Table of Contents
How To Reset Or Recover Root Password On OPNsense
Boot OPNsense into Single User Mode
The first step in recovering lost or forgotten root password for opnsense router/firewall is to boot it to single user mode.
Therefore reboot OPNsense and once it boots, immediately press 2 on your keyboard to switch to Single User Mode from the loader menu as shown in the screenshot above.
After it boots, you will be prompted to select the shell. Press Enter to start /bin/sh.
Mount Root Partition in Read/Write Mode
Before you can reset the password, you need to remount the drives as rewritable.
mount -o rw /
OR to mount all the drives;
mount -a -t ufs
Reset Or Recover Root Password On OPNsense
Once you have mounted the drives, run the following command to reset the root password.
Follow the prompts to reset the password.
You can reboot the system and log in with new password.
And Voila!! This is how simple it is to reset or recover root password on OPNsense.