Created attachment 207245 [details] Add patches for port Apply patches https://code.launchpad.net/~goneri/cloud-init/+git/cloud-init/+merge/368507 https://code.launchpad.net/~goneri/cloud-init/+git/cloud-init/+merge/365641 This Fix all mode cc_set_passwords (chpasswd:), hash, plain text, random generated. Second fix start network, without this require reboot vm or restart network/routing services. testport: OK (poudriere: 113amd64, 120amd64, 120i386, 13amd64 tested)
Thank you for the report and patch Andrey
If this patch looks good/works, it is 100% approved for application.
Full check i'm test cloud freebsd 12.0, all methods chpasswd work fine. May be need more tests validation, full data or not all user in list. But without this, chpasswd completely not work, set in users-groups work for only new users, root password be horror.
Real log test vm > 2019-09-06 11:06:43,593 - util.py[DEBUG]: Cloud-init v. 19.2 running 'modules:final' at Fri, 06 Sep 2019 11:06:43 +0000. Up 1567768003.4424992 seconds. > 2019-09-06 11:06:43,595 - stages.py[DEBUG]: Using distro class <class 'cloudinit.distros.freebsd.Distro'> > 2019-09-06 11:06:43,597 - stages.py[DEBUG]: Running module set_passwords (<module 'cloudinit.config.cc_set_passwords' from '/usr/local/lib/python3.6/site-packages/cloudinit/config/cc_set_passwords.py'>) with frequency once-per-instance > 2019-09-06 11:06:43,597 - handlers.py[DEBUG]: start: modules-final/config-set_passwords: running config-set_passwords with frequency once-per-instance > 2019-09-06 11:06:43,598 - util.py[DEBUG]: Writing to /var/lib/cloud/instances/XXX/sem/config_set_passwords - wb: [644] 24 bytes > 2019-09-06 11:06:43,598 - helpers.py[DEBUG]: Running config-set_passwords using lock (<FileLock using file '/var/lib/cloud/instances/XXX/sem/config_set_passwords'>) > 2019-09-06 11:06:43,598 - cc_set_passwords.py[DEBUG]: Handling input for chpasswd as multiline string. > 2019-09-06 11:06:43,599 - cc_set_passwords.py[DEBUG]: Setting password for: user > 2019-09-06 11:06:43,599 - util.py[DEBUG]: Running hidden command to protect sensitive input/output logstring: chpasswd for user > 2019-09-06 11:06:43,637 - cc_set_passwords.py[DEBUG]: Setting password for: root > 2019-09-06 11:06:43,637 - util.py[DEBUG]: Running hidden command to protect sensitive input/output logstring: chpasswd for root Without this patch simple add user without hash (users-groups) > user:thispassword:1001:1001::0:0:User &:/usr/home/user:/bin/sh > Stderr: pw: login name `root' already exists > 2019-09-07 08:47:08,742 - handlers.py[DEBUG]: finish: init-network/config-users-groups: FAIL: running config-users-groups with frequency once-per-instance > 2019-09-07 08:48:10,187 - util.py[WARNING]: Failed to set passwords with chpasswd for ['user', 'root'] > 2019-09-07 08:48:10,192 - util.py[WARNING]: Running module set-passwords (<module 'cloudinit.config.cc_set_passwords' from '/usr/local/lib/python3.6/site-packages/cloudinit/config/cc_set_passwords.py'>) failed
Maintainer timeout?
If you'd like to be the new maintainer, I'd be happy to pass it on!
Yes, i'm take this port
Make new version 19.4 #244057