我正在尝试使用curtin安装程序在通过MAAS部署的服务器中创建一个具有非加密密码的用户。
用户:installer
密码:lowpass
在我的curtin_userdata文件中,我有以下几行:
late_commands:
90_create_installer: ["sh", "-c", "sudo useradd installer -g 0"]
92_set_installer_password: ["sh", "-c", "echo 'installer:lowpass' | sudo chpasswd"]
94_cat: ["sh", "-c", "cat /etc/passwd"]在MAAS日志中,当cat /etc/passwd运行时,这一行显示得很好:
installer:x:1001:0::/home/installer:但是一旦它完成,我就连接到我的服务器,然后用户就不再存在了。
发布于 2018-08-03 20:26:33
我发现了我的问题:我没有使用in-target命令!
https://askubuntu.com/questions/1062034
复制相似问题