logo elektroda
logo elektroda
X
logo elektroda

How to reset Home Assistant user password without full reinstall? Access via command line, auth comm

p.kaczmarek2 1713 1
ADVERTISEMENT
📢 Listen (AI):
  • Home Assistant login screen with fields for username and password.
    Have you forgotten your Home Assistant instance password? Don't panic! It's very easy to recover it, at least as long as you have direct access to your HA command line. In case of virtualized HA machine, it can be done directly in VMware. If you have a physical machine, better prepare a keyboard...

    So, let's boot up our machine and get it recovered, shall we?
    I assume that you're seeing login screen in browser but don't know the password:
    Home Assistant login screen with fields for username and password.
    This can be easily recovered via HA command line:
    Home Assistant command line screen with system information.
    Use the following command, make sure to replace user with your existing user name, password can be any new password:
    
    auth reset --username user --password test
    

    The change will be accepted correctly:
    Password reset command in Home Assistant completed successfully.
    NOTE: If you specify user name that does not exist, you will get unknown error:
    Screenshot of command line showing password reset commands in Home Assistant.
    You can also get more generic help if you type auth ?:
    Screenshot showing the command line for managing Home Assistant user accounts.
    For example, auth list will list users and their information:
    Screenshot showing the auth list command in Home Assistant.

    This way you can reset your HA password easily.
    Next time, make sure that you don't lose it!
    By the way, I've also covered the same process for MQTT:
    https://www.elektroda.com/rtvforum/topic4097559.html
    So now you don't have to reinstall your setup. Thank you for reading!

    Cool? Ranking DIY
    Helpful post? Buy me a coffee.
    About Author
    p.kaczmarek2
    Moderator Smart Home
    Offline 
    p.kaczmarek2 wrote 12354 posts with rating 10228, helped 584 times. Been with us since 2014 year.
  • ADVERTISEMENT
  • #2 21602317
    vladekos
    Level 7  
    How do I start the command line?
    Mac OS and HA on Synology NAS
📢 Listen (AI):
ADVERTISEMENT