侧边栏壁纸
博主头像
liveJQ博主等级

沒有乐趣,何来开始

  • 累计撰写 118 篇文章
  • 累计创建 54 个标签
  • 累计收到 2 条评论

群晖如何设置root密码

liveJQ
2020-03-10 / 0 评论 / 0 点赞 / 119 阅读 / 1,692 字 / 正在检测是否收录...
广告 广告

开工

群晖内部许多设置都需要使用root用户身份才能修改,为此,需要知道其密码。

步驟1

群晖是利用admin用户设置root密码的,为此,需要先启用该用户

20200310_take_a_look_admin.jpg

虽然我们登录的账户和admin同属于administrators用户组,但却不是System default user,无法修改root密码

步驟2

使用ssh连接群晖后键入两条命令即可

sudo su -
synouser --setpw root yourpassword

20200310_set_password_for_root.jpg

题外话

利用ssh连接时可能碰到:重装了群晖,但ip没变,而ssh“指纹”已经改变,需要用户重新授权连接。

@lenovo ➜ ~  ssh admin@192.168.111.4
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@    WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED!     @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY!
Someone could be eavesdropping on you right now (man-in-the-middle attack)!
It is also possible that a host key has just been changed.
The fingerprint for the ECDSA key sent by the remote host is
SHA256:hgF1jJl93+tq6ZJvb1+HCABraLFftecVvrVr3cpvdOE.
Please contact your system administrator.
Add correct host key in /home/livejq/.ssh/known_hosts to get rid of this message.
Offending ECDSA key in /home/livejq/.ssh/known_hosts:6
  remove with:
  ssh-keygen -f "/home/livejq/.ssh/known_hosts" -R "192.168.111.4"
ECDSA host key for 192.168.111.4 has changed and you have requested strict checking.
Host key verification failed.

信息中已经给出了解决方法(移除旧的“指纹”重新授权添加)

@lenovo ➜ ~  ssh-keygen -f "/home/livejq/.ssh/known_hosts" -R "192.168.111.4"
# Host 192.168.111.4 found: line 6
/home/livejq/.ssh/known_hosts updated.
Original contents retained as /home/livejq/.ssh/known_hosts.old
@lenovo ➜ ~  ssh livejq@192.168.111.4                                        
The authenticity of host '192.168.111.4 (192.168.111.4)' can't be established.
ECDSA key fingerprint is SHA256:hgF1jJl93+tq6ZJvb1+HCABraLFftecVvrVr3cpvdOE.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '192.168.111.4' (ECDSA) to the list of known hosts.
livejq@192.168.111.4's password: 
Could not chdir to home directory /var/services/homes/livejq: No such file or directory
0
广告 广告

评论区