So you can’t login to the Sophos UTM WebAdmin interface anymore. It happens. Perhaps you’ve made a configuration change and locked yourself out, or perhaps you’ve just forgotten your password. I locked myself out a couple of times when playing around with the new 2 Factor Authentication feature in the Sophos UTM 9.2 Beta. Don’t worry, here’s the steps to reset your password.
You’ll first need a direct console into Sophos UTM. For hardware appliances, plug in a monitor and keyboard, or for Virtual Appliances open up your virtualization system’s management console for the Virtual Machine.
Once you have a console open, try to login as the root user.
Yep, locked out alright! So lets go ahead and reset the root user password. Then we can go about resetting the password for the WebAdmin user as well. If you can login as root, jump to Resetting the Web Admin Password below.
Reset Sophos UTMs Root User Password
To reset the root password:
- Ensure you have a monitor and a keyboard connected to the Sophos UTM and restart the UTM.
- Press the ESC key as the Sophos UTM starts to boot. You’ll soon see the GNU GRUB screen:
- Ensure the current Sophos UTM version is highlighted (should be the top option). Do NOT select the ones that say ‘previous’ or ‘rescue’.
- Press the ‘e‘ key (don’t press Enter!).
- Use the arrow keys to highlight the second option that starts with the word ‘kernel‘:
- Again, press the ‘e‘ key on the keyboard
- The cursor should be at the end of a string of text. Add this to the end:
- Press Enter to return to the previous screen, then press the ‘b‘ key on the keyboard to reboot the Sophos UTM.
- Once the UTM boots, the cursor will be at a command prompt
- Now we finally get to reset the password. Type: passwd loginuser
- Enter and re-enter a new password for the ‘loginuser’ account.
- Type: passwd root
- Enter and re-enter a new password for the root account.
- Press Ctrl+Alt+Del to reboot the Sophos UTM.
You have now reset both the loginuser and root passwords. Once the UTM has rebooted, check that the root password works by logging in as the root user.
Reset Sophos UTM WebAdmin Password
Now we have regained access to the root user login, we can reset the WebAdmin password.
- Ensure you are still logged in as root as per the last step above.
- Type cc at the prompt. This will take you to another prompt starting with 127.0.0.1 MAIN >
- Type RAW. This will switch you to RAW mode.
- Type system_password_reset
- Browse to the WebAdmin Interface. You will notice it is now asking you to set the password.
- Enter your new password into each box and hit Apply. You’ll then be directed to the usual WebAdmin login page
- Enter your shiny new credentials, and if everything went to plan, you should be logged in!
You can also checkout Sophos’ own guide on how to Recover access to your Sophos UTM in the event of password loss.
I hope this helps anyone else out there that has locked them selves out of their Sophos UTM box!
Shameless plug: Now that you’re logged in, why not make your life easier and setup Fastvue Sophos Reporter. Supercharge your reporting ability and get those pesky ad-hoc reporting tasks off your desk!