Would you like to learn how to recover the OPNsense admin password? In this tutorial, we are going to show you how to use the OPNsense password recovery procedure to change the password of the admin user using the command-line of an OPNsense server.

• OPNsense 19.7

Equipment list

The following section presents the list of equipment used to create this tutorial.

As an Amazon Associate, I earn from qualifying purchases.

Tutorial OPNsense – Password Recovery

Perform the OPNsense server boot and wait for the Welcome menu.

On the Welcome screen, select the option to enter the Single mode.

In our example, the single mode is available by pressing the number 2.

opnsense welcome screen

The system will ask you to enter full pathname of shell or RETURN for /bin/sh:

Press Enter to have access to the command-line prompt.

Use the FSCK command to verify if the filesystem is clean.

Copy to Clipboard

Use the FSCK command to verify is the filesystem is clean.

opnsense password recovery

OPNsense will mark the filesystem as clean.

Remount the root partition as rewritable

Copy to Clipboard

Execute the password reset command: opnsense-shell password

Copy to Clipboard

The Opnsense admin password will be reset.

Reboot the OPNsense server.

Copy to Clipboard

In our example, we changed the root user password to opnsense.

OPNsense Default Login

Open a browser software, enter the IP address of your Opnsense firewall and access web interface.

In our example, the following URL was entered in the Browser:

• https://192.168.15.11

The opnsense web interface should be presented.

opnsense login

On the prompt screen, enter the OPNsense Default Password login information.

• Username: root
• Password: opnsense

After a successful login, you will be sent to the OPNSense Dashboard.

opnsense dashboard

Congratulations! You successfully recovered the password of the OPNsense root user.