Update the "I'm Locked Out" documentation for using a container CLI (#18109)

* Update the "I'm Locked Out" documentation for using a container CLI

## Proposed change
Added steps to change a lost password through the command line when Home Assistant is running in a container. Also added a note that the "Change Password" button does not always show up, but switching to another interface will likely show it (I learned that _after_ figuring out this whole `hass` process).

Follow-up to unfinished #14477 by @hadim and https://community.home-assistant.io/t/reset-password-from-ha-docker-container/215537

## Type of change
* [ ]  Spelling, grammar or other readability improvements (`current` branch).
* [x]  Adjusted missing or incorrect information in the current documentation (`current` branch).
* [ ]  Added documentation for a new integration I'm adding to Home Assistant (`next` branch).
  
  * [ ]  I've opened up a PR to add logo's and icons in [Brands repository](https://github.com/home-assistant/brands).
* [ ]  Added documentation for a new feature I'm adding to Home Assistant (`next` branch).
* [ ]  Removed stale or deprecated documentation.

## Additional information
* Link to parent pull request in the codebase:
* Link to parent pull request in the Brands repository:
* This PR fixes or closes issue:

## Checklist
* [x]  This PR uses the correct branch, based on one of the following:
  
  * [x] I made a change to the existing documentation and used the `current` branch.
  * [ ] I made a change that is related to an upcoming version of Home Assistant and used the `next` branch.
* [x]  The documentation follows the Home Assistant documentation [standards](https://developers.home-assistant.io/docs/documenting/standards).

* Update instructions for a forgotten password

- Moved the container command line instructions under the console instructions.
- Used wording from the section introduction to rename the authentication reset instructions.
- Removed mention of using a password manager since the user obviously did not (and HA has not been compatible with some password managers in some browser configurations recently). This is why I did not use one and why I had to figure out how to reset my password, then share the instructions with the community.
This commit is contained in:
J M H 2021-07-28 02:57:28 -07:00 committed by GitHub
parent 955c9621e4
commit 7bc737d1ac
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -21,15 +21,27 @@ Connect a keyboard and monitor to your device.
`auth reset --username existing_user --password new_password`
#### To reset a user's password, via the container command line
If you are running Home Assistant in a container, you can use the command line in the container with the `hass` command to change your password. The steps below refer to a Home Assistant container in Docker named `ha`. Note that while working in the container, commands will take a few moments to execute.
1. `docker exec -it ha bash` to open to the container command line
2. `hass` to create a default user, if this is your first time using the tool
3. `hass --script auth --config /config change_password existing_user new_password` to change the password
4. `exit` to exit the container command line
5. `docker restart ha` to restart the container
#### To reset a user's password, as an administrator via the web interface
1. Click "Configuration" in the sidebar.
2. Scroll down to "Users", and click in to that section.
3. Click on the user, this should bring up a dialog box.
4. At the bottom of the dialog box, click "Change Password".
5. Enter the new password, and then click "OK".
6. Confirm the new password by entering it again, and then click "OK" again.
7. A confirmation box will be displayed with the text "Password was changed successfully".
1. Confirm that you have "Advanced Mode" activated on your "Profile" page.
2. Click "Configuration" in the sidebar.
3. Scroll down to "Users", and click in to that section.
4. Click on the user, this should bring up a dialog box.
5. At the bottom of the dialog box, click "Change Password".
- If you do not see the "Change Password" button, try using another interface, such as the mobile version.
6. Enter the new password, and then click "OK".
7. Confirm the new password by entering it again, and then click "OK" again.
8. A confirmation box will be displayed with the text "Password was changed successfully".
#### To delete a user, as an administrator via the web interface
@ -40,9 +52,9 @@ Connect a keyboard and monitor to your device.
5. A confirmation dialog box will be displayed, asking "Are you sure you want to delete <User>"?
6. Click "OK".
### Home Assistant Core and Home Assistant Container
#### Start a new onboarding process
While you should hopefully be storing your passwords in a password manager, if you lose the password associated with the owner account the only way to resolve this is to delete *all* the authentication data. You do this by shutting down Home Assistant and deleting the following files from the `.storage/` folder in your [configuration folder](/docs/configuration/):
If you lose the password associated with the owner account and the steps above do not work to reset the password, the only way to resolve this is to delete *all* the authentication data. You do this by shutting down Home Assistant and deleting the following files from the `.storage/` folder in your [configuration folder](/docs/configuration/):
- `auth`
- `auth_provider.homeassistant`