Tag Archives: UTM

Sophos UTM User Portal misconfiguration

While testing a Sophos UTM (formerly known as an Astaro Security Gateway) trying to get the user portal configured on port 443 I locked myself completely out of the system. It caused all websites that where configured by the Web Application Firewall to show the userportal and the admin interface was no longer functioning after it was restarted. So my only option to gain access was on console level. For this I followed steps 1 to 16 of this support article on the Sophos website.

  • Shutdown the UTM.
  • Ensure both a monitor and a keyboard are connected the UTM if it is a physical device. In case of a hypervisor, this will have to supply a console option.
  • Power on the UTM, wait until the GRUB boot loader starts …… and then press the ‘Esc’ key before the short timeout expires.
  • Highlight (do not press enter/return and use only the arrow keys) the version of software the UTM is running that does not mention either ‘previous’ or ‘rescue’.
  • Press the ‘e’ key on the keyboard.
  • Highlight (again do not press enter) the second option in the list shown on screen that starts with the word ‘kernel’.
  • Press the ‘e’ key on the keyboard.
  • Type: ” init=/bin/bash” at the end of the line (with a space before init).
  • Press enter and wait for the screen to reload.
  • Press the ‘b’ key on the keyboard. The UTM will boot up.
  • 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 on the keyboard. The UTM will reboot.
  • Login as root with the newly set password

After these 16 Steps are taken and I’ve logged on as the “root” user and looking around a bit I figured out what I think is the userportal and shut it down with the following command:

  • sh /var/mdw/scripts/uma stop

After running this command the WebAdmin interface was accessible again and I changed the configuration of the User Portal which caused the problem and rebooted the UTM after which everything returned to normal operations.