Turning Off two factor authentication

Is it possible to turn off Two Factor authentication through the Console? regardless of what I do, I can’t log in to Home Assistant front end using the code provided by the google authenticator any more after having to restore a snapshot. time appears to be ok as does the timezone. So I’d like to know if there is a config I can edit to turn this off locally.



now whether this was the right thing to do or not.

  • renamed auth_module.totp to auth_module.totp.tmp which I found in /config/.storage
  • rebooted the host.
  • Logged in without being asked for the two-factor code.
  • Enabled then Disabled the Authenticator app through the GUI
  • Saw that the original file auth_module.totp has been recreated.

All seems fine now.



Thanks so much. It worked.

1 Like

I had trouble finding the file on my hassio instance, but renaming the file and rebooting worked for me. To get to that file I had to:

  1. Connect monitor and keyboard to my Pi
  2. Enter “login” in the ha terminal that comes up by default. This allowed me to access the host system
  3. connect to the docker container that is running home assistant: docker exec -it homeassistant bash
  4. When I connected to the docker container, I was in the config directory by default, so I had to move into the hidden .storage folder
  5. rename the totp file with “mv auth_module.totp auth_mudule.totp.tmp”
  6. Reboot the home assistant machine

I’m locked out of my HA (smartphone crashed with authenticated HA client and verified authenticator app). I’m unable to use the HA app nor am I able to logon via the web gui.

Looks like I need to perform the actions you suggested. But how do I go about this when HA is running as a docker image? I guess the /config/.storage is within that image, since I can’t find this anywhere.

Thanks for helping me out.

Found it. done.

hi guys, i have the same problem. can it be disabled by entering the micro sd without having to access with monitor? and if so what should i do? thank you

This works and is super easy (if you are comfortable with hidden files). Thank you!

Please, I need help. I am not familiar with the use of command HA.
Could you explain me step by step how to stop 2FA ?

After typing :

  1. “login”
  2. “docker exec -it homeassistant bash”
  3. what can I do now ?

Thank you for your help

Hi, I’m not comfortable with command line, could you describe step by step ? Please

I am in a similar situation. Started HA both at house and at work a year ago. Finally got house going - back to work and on starting it is asking for Two Factor Authentication - which I can not remember setting up. I have checked my mobile and spam bins of my email accounts and not received any 2FA codes there. So I think that I need to remove this feature.

I am following through @danwize post and am stuck at step 4. I don’t know how to move to the “hidden .storage folder” as instructed

I then need instructioins please how to do this and how to do step 5. rename the totp file with “mv auth_module.totp auth_mudule.totp.tmp”

currently sitting as below


I finally remembered that a year ago I also installed the Authy App on my android, went there and got my 2FA code - and I’m in!

I have been into settings now on the dash board and switched off 2FA