Reset webadmin and root password sur un Sophos UTM 9

 

How to Reset Sophos UTM Passwords (WebAdmin, Root and Loginuser)

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.

Sophos UTM Console 

Once you have a console open, try to login as the root user.

Sophos UTM Root Login Incorrect 

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:

  1. Ensure you have a monitor and a keyboard connected to the Sophos UTM and restart the UTM.
  2. Press the ESC key as the Sophos UTM starts to boot. You’ll soon see the GNU GRUB screen:
    Sophos UTM GNU GRUB Loader
  3. Ensure the current Sophos UTM version is highlighted (should be the top option).  Do NOT select the ones that say ‘previous’ or ‘rescue’.
  4. Press the ‘e‘ key (don’t press Enter!).
  5. Use the arrow keys to highlight the second option that starts with the word ‘kernel‘:
    Sophos UTM Kernel Boot Option
  6. Again, press the ‘e‘ key on the keyboard
  7. The cursor should be at the end of a string of text. Add this to the end:
    init=/bin/bash

    Sophos UTM init=/bin/bash

  8. Press Enter to return to the previous screen, then press the ‘b‘ key on the keyboard to reboot the Sophos UTM.
  9. Once the UTM boots, the cursor will be at a command promptSophos UTM Command Prompt
  10. Now we finally get to reset the password. Type: passwd loginuser
  11. Enter and re-enter a new password for the ‘loginuser’ account.
  12. Type: passwd root
  13. Enter and re-enter a new password for the root account.
    Sophos UTM Resetting the Root Password
  14. 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.

Sophos UTM Successful Root Login

Reset Sophos UTM WebAdmin Password

Now we have regained access to the root user login, we can reset the WebAdmin password.

  1. Ensure you are still logged in as root as per the last step above.
  2. Type cc at the prompt. This will take you to another prompt starting with 127.0.0.1 MAIN >
    Sophos UTM CC Command
  3. Type RAW. This will switch you to RAW mode.
    Sophos UTM RAW Mode
  4. Type system_password_reset
    Sophos UTM system_password_reset
  5. Browse to the WebAdmin Interface. You will notice it is now asking you to set the password.
    Sophos UTM WebAdmin Password Reset
  6. Enter your new password into each box and hit Apply. You’ll then be directed to the usual WebAdmin login page
    Sophos UTM WebAdmin Login Page
  7. Enter your shiny new credentials, and if everything went to plan, you should be logged in!

source : Fastvue Sophos Reporter

Facebook Auto Publish Powered By : XYZScripts.com