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  1 2607 Cool? (+6)
📢 Listen (AI):

TL;DR

  • Resets a forgotten Home Assistant user password without reinstalling the instance, using direct access to the Home Assistant command line or VMware console.
  • Uses the `auth reset --username user --password test` command, with `auth ?` for help and `auth list` to view existing users.
  • Works only when you can reach the HA CLI; entering a non-existent username returns an unknown error.
Generated by the language model.
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!

About Author
p.kaczmarek2
p.kaczmarek2 wrote 14416 posts with rating 12374 , helped 650 times. Been with us since 2014 year.

Comments

vladekos 09 Jul 2025 23:04

How do I start the command line? Mac OS and HA on Synology NAS [Read more]

FAQ

TL;DR: In 1 command, "don't panic": Home Assistant users who still have command-line access can reset a forgotten password without a full reinstall. Run auth reset --username user --password newpass, but replace user with an existing username. This FAQ helps people locked out of the web login recover access from the local HA console. [#21439738]

Why it matters: If you can still reach the Home Assistant command line, you can restore access in minutes and avoid rebuilding an existing setup. [#21439738]

Recovery path What you need Result Limitation
auth reset from HA command line Direct CLI access and an existing username Sets a new password Fails with an unknown error if the username does not exist
Full reinstall Rebuild the whole setup Restores access indirectly Unnecessary when CLI access still works
Browser login screen only Web access without the password Cannot reset by itself You still need command-line access

Key insight: The username matters as much as the new password. If you forget the password, first confirm the exact existing username with auth list, then run auth reset. [#21439738]

Quick Facts

  • The thread shows a direct recovery method built around 1 CLI command: auth reset --username user --password test. You must replace user with an existing account name. [#21439738]
  • Home Assistant exposes at least 3 relevant auth actions in the discussion: auth reset, auth ?, and auth list. That makes the CLI useful for both recovery and account lookup. [#21439738]
  • The recovery path depends on local machine access. In a virtualized setup, the post names VMware; on a physical machine, it advises preparing a keyboard for direct console use. [#21439738]
  • The key failure case is specific: using a non-existent username during auth reset returns an unknown error, even if the password syntax is correct. [#21439738]

How do I reset a Home Assistant user password without doing a full reinstall?

Reset it from the Home Assistant command line instead of reinstalling the system. 1. Open the local HA console. 2. Run auth reset --username user --password newpass. 3. Replace user with the existing username and choose any new password. This method works when you can still access the machine directly, even if the browser login is locked. [#21439738]

What is the exact Home Assistant CLI command to reset a password for an existing user?

The exact command shown is auth reset --username user --password test. Replace user with the real existing username, and replace test with your new password. The thread explicitly says the password can be any new password, but the username must already exist. [#21439738]

Why does Home Assistant show an unknown error when I run auth reset with a username that does not exist?

Home Assistant shows that unknown error because the username you passed to auth reset does not exist. The thread notes this as a specific failure case, not a general CLI crash. If the username is wrong, the reset is not accepted, even when the command format is otherwise correct. [#21439738]

How can I list all Home Assistant users from the command line before resetting a password?

Run auth list from the Home Assistant command line. The thread says this command lists users and their information, which helps you confirm the exact account name before changing the password. That step avoids the unknown-error case caused by a non-existent username. [#21439738]

Where do I open the Home Assistant command line when HA is running in VMware or on a physical machine?

Open the command line on the machine that runs Home Assistant. For a virtualized setup, the thread names VMware as a direct access path. For a physical machine, it advises preparing a keyboard so you can work at the local console instead of the browser login page. [#21439738]

How do I start the command line for Home Assistant on a Synology NAS when I use a Mac?

The thread does not answer that Synology-on-Mac question. It only asks, "How do I start the command line? Mac OS and HA on Synology NAS," but provides no follow-up steps, commands, or interface path. In this discussion, the only confirmed access methods are VMware and a physical machine with a keyboard. [#21602317]

What is the auth command in Home Assistant, and what authentication tasks can it perform?

auth is a Home Assistant CLI command group that handles account-related authentication tasks from the command line. In this thread, it is shown performing 3 actions: auth reset to set a new password, auth ? to display help, and auth list to show users and their information. [#21439738]

What does auth list show in Home Assistant, and how do I use that information to pick the correct username?

auth list shows users and their information. Use it to match the exact existing username before you run auth reset, because the reset command fails with an unknown error when the username does not exist. That makes auth list the safest first step if you are unsure which account name Home Assistant expects. [#21439738]

Home Assistant password reset vs full reinstall — which is the better recovery method after losing access?

Password reset from the CLI is the better recovery method when you still have direct command-line access. The thread presents it as an easy recovery path and closes by saying you do not have to reinstall your setup. Reinstalling adds unnecessary work when 1 command can restore access. [#21439738]

What should I do if I forgot both my Home Assistant password and the exact username for the account?

First recover the username, then reset the password. Run auth list to view users and their information, identify the exact account name, and only then run auth reset --username user --password newpass. This two-step flow avoids the unknown-error case tied to a non-existent username. [#21439738]

How can I safely change a Home Assistant password from the CLI without breaking the existing setup?

Use the built-in auth command instead of reinstalling anything. 1. Access the local HA command line. 2. Confirm the account with auth list if needed. 3. Run auth reset --username user --password newpass with the exact existing username. The thread presents this as a normal recovery action and not a destructive maintenance step. [#21439738]

Why might the Home Assistant command line not be available from the browser login screen, and how can I access it another way?

The browser login screen only shows the web login, not the local command line needed for recovery. The thread assumes you can see the login page but do not know the password, then directs you to recover access through the HA command line instead. It names 2 alternate paths: VMware console access or a physical machine with a keyboard. [#21439738]

What is Home Assistant command line access, and how is it different from logging in through the web interface?

"Home Assistant command line access" is a local console access method that lets you run HA CLI commands directly on the host system, instead of authenticating through the browser-based web login. In the thread, the web interface is blocked by a forgotten password, while the command line still allows auth commands to recover the account. [#21439738]

Which Home Assistant installation types support using auth reset directly, such as VMware, Synology NAS, or a physical machine?

The thread explicitly confirms 2 installation contexts for direct auth reset use: a virtualized HA machine in VMware and a physical machine with a keyboard attached. It mentions Synology NAS only in an unanswered follow-up question, so this discussion does not confirm a Synology procedure. [#21439738]

What troubleshooting steps should I try if auth reset does not work on my Home Assistant instance?

Check the username first, then verify the command from the local HA console. 1. Run auth ? to confirm available auth options. 2. Run auth list to find the exact existing username. 3. Retry auth reset --username user --password newpass. The main documented failure is an unknown error caused by a username that does not exist. [#21439738]
Generated by the language model.
%}