![在自动安装期间设置 root 密码](https://linux22.com/image/1182725/%E5%9C%A8%E8%87%AA%E5%8A%A8%E5%AE%89%E8%A3%85%E6%9C%9F%E9%97%B4%E8%AE%BE%E7%BD%AE%20root%20%E5%AF%86%E7%A0%81.png)
是否可以使用 Ubuntu 自动安装(即用户数据)设置 root 密码?
我试过:
user-data:
disable_root: false
chpasswd:
list: |
root:$6$AYtLXyyVZAea2aLJ$UQxW1cz2vWWNn.17.3QYH5TxZqIMGoLJCpqbBTfClhUKxqouYn7/Yc5Jsq.bCeK0VDLPxbL6xzfJ0xqTb6MLk.
但无济于事。
答案1
这应该有效:
version: 1
user-data:
disable_root: false
identity:
hostname: hostname
username: root
password: $6$AYtLXyyVZAea2aLJ$UQxW1cz2vWWNn.17.3QYH5TxZqIMGoLJCpqbBTfClhUKxqouYn7/Yc5Jsq.bCeK0VDLPxbL6xzfJ0xqTb6MLk.