
Hello I'm using a Centos7 cloud image from built-in ovirt-image-repository and I have some trouble setting an initial password for a given user with cloud-init. Basically, it doesn't set any password. Other things work: user is created, ssh key is set (both for the user and root) but no password. This is a problem for me because I want to automatically provision the image with Foreman but the ovirt integration works only with password. The cloud-init logs in the VMs doesn't tell anything about password being or not set. What's the password format accepted in the GUI? plain text? or salted hash like plain cloud-init config? Thanks -- Davide Ferrari Senior Systems Engineer

On 23 Sep 2016, at 13:45, Davide Ferrari <davide@billymob.com> wrote:
Hello
I'm using a Centos7 cloud image from built-in ovirt-image-repository and I have some trouble setting an initial password for a given user with cloud-init.
Basically, it doesn't set any password. Other things work: user is created, ssh key is set (both for the user and root) but no password. This is a problem for me because I want to automatically provision the image with Foreman but the ovirt integration works only with password.
The cloud-init logs in the VMs doesn't tell anything about password being or not set. What's the password format accepted in the GUI? plain text? or salted hash like plain cloud-init config?
it should be plaintext did you want to configure root or some other user? once the guest is booted you can get the settings from the attached cdrom in that vm, just mount it and check what does it configure exactly thanks, michal
Thanks
-- Davide Ferrari Senior Systems Engineer _______________________________________________ Users mailing list Users@ovirt.org http://lists.ovirt.org/mailman/listinfo/users

2016-09-23 13:49 GMT+02:00 Michal Skrivanek <michal.skrivanek@redhat.com>:
it should be plaintext did you want to configure root or some other user?
As some other user. And after fiddling a while (thanks for the cdrom
tip!), I discovered that the password setting works only with the root user. As a proof, here it is the user_data created with a "centos" user, password "centos" specified: #cloud-config output: all: '>> /var/log/cloud-init-output.log' disable_root: 0 runcmd: - 'sed -i ''/^datasource_list: /d'' /etc/cloud/cloud.cfg; echo ''datasource_list: ["NoCloud", "ConfigDrive"]'' >> /etc/cloud/cloud.cfg' timezone: Europe/Warsaw ssh_pwauth: true chpasswd: expire: false user: centos package_upgrade: true and here it is the same file setting a password "centos" for the user root: #cloud-config output: all: '>> /var/log/cloud-init-output.log' password: centos disable_root: 0 runcmd: - 'sed -i ''/^datasource_list: /d'' /etc/cloud/cloud.cfg; echo ''datasource_list: ["NoCloud", "ConfigDrive"]'' >> /etc/cloud/cloud.cfg' timezone: Europe/Warsaw ssh_pwauth: true chpasswd: expire: false user: root Maybe I didn't discover anything new but I wasn't able to find any documentation about this before.
participants (2)
-
Davide Ferrari
-
Michal Skrivanek