Context password for vm

Hello,

this may be asked already (in some way or another) but i couldn’t find a definitive answer. So here my question:

how can add a root password for each VM (my guess in the contextualization) differently?

my scenario:
i created user 1 with username and password - he creates VM centos - the user logs into SSH with his password from opennebula
i create user 2 with other username and other password - he creates VM ubuntu - the user logs into ssh with his own password from opennebula

or something like that. i dont want to make a general password for everyone, but each user with his own password can login into SSH with the password that was created by them.

best regards,

Hello @darkfritz2,

how can add a root password for each VM (my guess in the contextualization) differently?

You are on the right track.
Following the docs for VM contextualization you could set the contextualization variable PASSWORD . There are other options possible too, you could check VM template contextualization.

For users to provide a password you should define the variable as an User Input. For more details follow Manage Virtual Machine Templates - Ask for User Inputs

Hope this helps.

Best Regards,
Anton Todorov

Hello,

i know but this doesn’t solve the issue. if user x reboots the server and user y knows the IP address of user x then user y could enter into the VM with the provided password. that’s a huge security breach.

can’t i link the oneuser password into all the VMs that the user creates?

The password hashing for the oneuser in OpenNebula and VM OS user must match. I think that there is no such feature in OpenNebula so feel free to open feature request for such implementation.

Another option I could thing off top of my head is to have LDAP authorisation configured for both OpenNebula and the VM logins.

Best Regards,
Anton Todorov