『瀚思彼岸』» 智能家居技术论坛

 找回密码
 立即注册
查看: 9660|回复: 8

[技术探讨] 在虚拟环境下安装要输入密码问题

[复制链接]

11

主题

120

帖子

321

积分

中级会员

Rank: 3Rank: 3

积分
321
金钱
201
HASS币
0
发表于 2019-5-2 19:28:55 | 显示全部楼层 |阅读模式
  最近HA老是出错,重装了HA,但在虚拟环境下安装插件要输入密码,自己没有设置。现在绕并不过求助下大神们
屏幕快照 2019-05-02 下午7.25.09.png
回复

使用道具 举报

23

主题

1335

帖子

6593

积分

超级版主

Rank: 8Rank: 8

积分
6593
金钱
5233
HASS币
100

教程狂人

发表于 2019-5-2 20:59:22 | 显示全部楼层
看下吧ha用户加入root组,设置免密试试
或者换hassio,一键安装没烦恼
回复

使用道具 举报

11

主题

120

帖子

321

积分

中级会员

Rank: 3Rank: 3

积分
321
金钱
201
HASS币
0
 楼主| 发表于 2019-5-2 21:47:54 | 显示全部楼层
natic 发表于 2019-5-2 20:59
看下吧ha用户加入root组,设置免密试试
或者换hassio,一键安装没烦恼

omeassistant) homeassistant@raspberrypi:/srv/homeassistant $ sudo passwd root

We trust you have received the usual lecture from the local System
Administrator. It usually boils down to these three things:

    #1) Respect the privacy of others.
    #2) Think before you type.
    #3) With great power comes great responsibility.

[sudo] password for homeassistant:
Sorry, try again.
[sudo] password for homeassistant:
Sorry, try again.
[sudo] password for homeassistant:
sudo: 3 incorrect password attempts
(homeassistant) homeassistant@raspberrypi:/srv/homeassistant $ sudo passwd

We trust you have received the usual lecture from the local System
Administrator. It usually boils down to these three things:

    #1) Respect the privacy of others.
    #2) Think before you type.
    #3) With great power comes great responsibility.

[sudo] password for homeassistant:


Sorry, try again.
[sudo] password for homeassistant:

Sorry, try again.
[sudo] password for homeassistant:

sudo: 3 incorrect password attempts
跟着百度的教程不管怎么修改都是一样的结果,都是绕不过输入密码的节奏。
回复

使用道具 举报

12

主题

328

帖子

1792

积分

论坛技术达人

积分
1792
金钱
1459
HASS币
40
发表于 2019-5-3 12:11:01 | 显示全部楼层
homeassistant用户默认没有密码,你可以用passwd更改密码,你出现的这个问题是没有把homeassistant用户添加到sudo的配置里面,可以试一下如下操作:
用root用户运行visudo,在配置里面
在root    ALL=(ALL:ALL) ALL 后面
增加:homeassistant    ALL=(ALL:ALL) ALL
保存退出,然后运行你的命令,输入一次你设置homeassistant密码
应该就可以了
回复

使用道具 举报

11

主题

120

帖子

321

积分

中级会员

Rank: 3Rank: 3

积分
321
金钱
201
HASS币
0
 楼主| 发表于 2019-5-3 14:07:17 | 显示全部楼层
linlingzi 发表于 2019-5-3 12:11
homeassistant用户默认没有密码,你可以用passwd更改密码,你出现的这个问题是没有把homeassistant用户添加 ...

好的,退出了虚拟环境才可以更换。不然死活都是提示密码不对
回复

使用道具 举报

11

主题

120

帖子

321

积分

中级会员

Rank: 3Rank: 3

积分
321
金钱
201
HASS币
0
 楼主| 发表于 2019-5-6 19:28:05 | 显示全部楼层
annsenke 发表于 2019-5-3 14:07
好的,退出了虚拟环境才可以更换。不然死活都是提示密码不对

更正下,因为在创建homeassistant用户的时候没有建立密码的原因,导致在虚拟环境下的安装sudo命令的时候需要输入密码。本因为退出后提添加homeassistantALL AAL=(ALL:ALL) ALL就是行了,结果不是的。是要为创建的homeassistant创建一个密码就可以解决了。
屏幕快照 2019-05-06 下午7.22.37.png
回复

使用道具 举报

0

主题

4

帖子

85

积分

注册会员

Rank: 2

积分
85
金钱
81
HASS币
0
发表于 2021-5-1 18:17:30 | 显示全部楼层
感谢!!
回复

使用道具 举报

16

主题

235

帖子

1501

积分

金牌会员

Rank: 6Rank: 6

积分
1501
金钱
1266
HASS币
0
发表于 2022-8-21 21:19:05 | 显示全部楼层
遇见问题找到此地望能解决
回复

使用道具 举报

9

主题

179

帖子

1393

积分

金牌会员

Rank: 6Rank: 6

积分
1393
金钱
1214
HASS币
0
发表于 2022-9-4 02:07:10 | 显示全部楼层
请问怎么解决的,我也遇到这个了
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

Archiver|手机版|小黑屋|Hassbian

GMT+8, 2024-5-21 22:09 , Processed in 0.915313 second(s), 34 queries .

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表