by
Scott Glew
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 are 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 log in as the root user.
Yep, locked out alright! So let's 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.
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:
init=/bin/bash
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.
Did you know: Fastvue Sophos Reporter produces clean, simple, web usage reports using log data from your Sophos UTM that you can confidently send to department managers and HR team. Why use Fastvue over Sophos iView?
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 themselves out of their Sophos UTM box!
Now that you're logged in, why not make your life easier and setup Fastvue Sophos Reporter? Fastvue Sophos Reporter consumes syslog data from Sophos UTM (SG) and Sophos XG Firewalls and produces clean, simple, web usage reports that you can confidently send to department managers and HR team. Automate reports and get the job of reporting on web usage off your desk and into the hands of people that need it. Download the 30 day free trial today!
Download our FREE 30-day trial, or schedule a demo and we'll show you how it works.
Filtering and Forwarding Sophos UTM Syslog Data with Syslog-ng
How to Configure Multiple Site-to-Site SSL VPNs with Sophos UTM