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

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:

This can be easily recovered via HA command line:

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:

NOTE: If you specify user name that does not exist, you will get unknown error:

You can also get more generic help if you type auth ?:

For example, auth list will list users and their information:

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!
Comments
How do I start the command line? Mac OS and HA on Synology NAS [Read more]