当前位置:   article > 正文

armbian docker 部署 homeassistant && 忘记密码重置密码_armbian密码忘记如何找回

armbian密码忘记如何找回
  1. docker run -d \
  2. --name homeassistant \
  3. --privileged \
  4. --restart=unless-stopped \
  5. -e TZ=MY_TIME_ZONE \
  6. -v /etc/docker/ha:/config \
  7. -v /run/dbus:/run/dbus:ro \
  8. -p 8123:8123 \
  9. ghcr.io/home-assistant/home-assistant:stable

重置用户的密码,通过容器命令行

如果您在容器中运行“家庭助理”,则可以使用容器中的命令行和命令来更改密码。以下步骤是指 Docker 中名为 的 Home Assistant 容器。请注意,在容器中工作时,命令需要一些时间才能执行。hasshomeassistant

  1. docker exec -it homeassistant bash打开到容器命令行
  2. hass创建默认用户(如果这是您首次使用该工具)
  3. hass --script auth --config /config change_password existing_user new_password更改密码
  4. exit退出容器命令行
  5. docker restart homeassistant重新启动容器。

用户名密码存放位置

  1. find / -name auth_provider.homeassistant
  2. /config/.storage/auth_provider.homeassistant
  3. cat /config/.storage/auth_provider.homeassistant
  4. {
  5. "version": 1,
  6. "minor_version": 1,
  7. "key": "auth_provider.homeassistant",
  8. "data": {
  9. "users": [
  10. {
  11. "username": "******",
  12. "password": "**********************************************************************"
  13. }
  14. ]
  15. }
  16. }
  17. ~
  18. ~

 重置密码

  1. docker exec -it homeassistant /bin/bash
  2. hass --script auth --config /config change_password 用户名 新密码

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/weixin_40725706/article/detail/884602
推荐阅读
相关标签
  

闽ICP备14008679号