What happens if I loose my 2FA TOTP token for my admin account

I have not enabled 2FA yet because my webmin ports are hidden behind my NAT and that is where they will stay.

However if I enable 2FA on my main admin account and I loose my TOTP tokens, how can I login into Webmin again?

Lets also assume I do not have another system admin account or they are all locked because I lost the 2FA tokens for them as-well.

Thanks

NB: I did look for 2FA docs and I could not find one so the solution added here would be helpful as a doc.

Will you have ssh access? You can disable in config file.

1 Like

thats useful. so TOTP is only for the Webmin GUI.

Do you have any pointers where and what to make a change over SSH?

I want to add this to my notes before this issue happens.

Found it :slight_smile: (post from Ilia) That look like it reset to the systems root password.

You need to login as root using SSH and edit /etc/webmin/miniserv.users file, and replace:

root:x::::::::0:0:totp:HOQ7RXY76CGMOACH:

with

root:x:0

Note that root should correspond with your actual username. Also, don’t forget to restart Webmin after editing miniserv.users manually.

check this post

4 Likes

thanks, this will do nicely. I will add this to my notes.

This topic was automatically closed 8 days after the last reply. New replies are no longer allowed.