Dang it! I also locked myself out of the webadmin on Sophos UTM 9.2 while trying out their OTP function with Google Authenticator.
Here’s how I fixed this problem:
Login to the Firewall Console Interface as root
at the / type
cc
then auth and press enter,
it will list out:
ad_sso
auto_add_to_facility@
auto_add_users$
block
cache_lifetime$
edir_sso
otp
servers@
Type otp and press enter,
it will list out:
auto_create_token$
default_timestep$
facilities@
require_all_users$
required_users@
status$
Type facilities@ and press enter,
finally listing:
0 webadmin
1 portal
2 ipsec
3 openvpn
Type -0 and press enter, where it will redisplay (in this case)
0 portal
1 ipsec
3 openvpn
Login as admin to your firewall via the webadmin!!!