Using CentOS 7 - KVM Image from MarketPlace - root password is deleted on each reboot

(Yordan Yordanov) #1

Hello all,

I’m using the default CentOS 7 - KVM image from the MarketPlace. I have this really lame problem, but I really can’t find the culprit. On each reboot of the VM (no matter persistent or not), the root password is lost. I can see that it’s completely removed from /etc/shadow. This started happening after I re-downloaded the image about a month ago. Before that I was using the same image and didn’t have this problem, but maybe it was updated in the MarketPlace in the mean time. Maybe it’s a feature, but I’d really like to turn it off. It renders the Sunstone VNC useless since you can only login with a password in the machine and if it is in trouble during boot, then you’re toast…

My OpenNebula version is 5.4.6 if that matters.

(Vlastimil Holer) #2

Hello @Jacket ,

the latest version of contextualization packages, which is part of the latest Marketplace Appliances, resets the password for the contextualized user (by default root) if no password is specified via contextualization. You have to let the contextualization to set the password, and this one will persist:



In the next release, there will be an option to disable the password reset if no password specified:
… but it’s not possible right now.

Best regards,
Vlastimil Holer

(Yordan Yordanov) #3

Thank you for the answer! I just tried with CRYPTED_PASSWORD since I don’t like my password being exposed in plain text. It seems to be working on a test vm. Is there any way to update the configuration of my vms without powering them off first?

(Vlastimil Holer) #4

You have to power off the VMs, then you can update the configuration (context) in the OpenNebula. Unfortunately, but still better than to destroy and recreate the new VMs.

(Yordan Yordanov) #5

Got it. Thanks!