【发布时间】:2023-01-14 08:37:44
【问题描述】:
我正在尝试为我的几台运行 Ubuntu 22.04 服务器的 Ubuntu 机器设置一些默认设置。这是我的配置:
#cloud-config
ssh_pwauth: false
groups:
- mygrp: [myuser]
users:
- name: myuser
gecos: myuser
sudo: ALL=(ALL) NOPASSWD:ALL
groups: sudo
ssh_import_id: None
lock_passwd: true
shell: /bin/bash
# Replace the <ssh-pub-key> with the actual SSH public key
ssh_authorized_keys:
- <ssh-pub-key>
hostname: my-host-1
当我运行它时,我看到以下错误:
2023-01-13 16:12:27,398 - __init__.py[WARNING]: Skipping creation of existing group 'mygrp'
2023-01-13 16:12:27,403 - __init__.py[WARNING]: Unable to add group member 'myuser' to group 'mygrp'; user does not exist.
我的这个脚本有什么问题?
【问题讨论】:
标签: ubuntu cloud-init