Hi Giancarlo, what image are you using? what context packages are you using?
As you might already know, contextualization in OpenNebula works by creating a CDROM image with all the metadata and attaching it to the Virtual Machine. The VM must have init scripts that open that CDROM image, process the data and apply the changes. Currently the packages provided by the OpenNebula project don't modify root's password for security reasons, just like Olivier said, it's better to use ssh public key authentication. However if you definitely want to set the root password you can do the following (assuming you're using our contextualization packages) If you provide a 'init.sh' script it will be executed right at the very end of the boot sequence, therefore you can create a script that sets the password, call it 'init.sh' and include it in the VM: Step 1: $ cat init.sh #!/bin/bash [ -n "$ROOT_PASSWORD" ] && usermod -p "$ROOT_PASSWORD" root Step 2: In sunstone, register a new File in the "Files & Kernels" tab, select Type = CONTEXT and call it 'init.sh' and point to the file Step 3: Update your template to include that file: Template -> More -> Update -> Context -> Files -> Click Refresh -> Click 'init.sh' -> Click 'Update' Step 4: Create a password in 'crypt' format, for example by doing: echo -n 'mypassword'|openssl passwd -1 -stdin => <crypt password> Add the ROOT_PASSWORD to the Template Template -> More -> Update -> Context -> Custom Variables -> add ROOT_PASSWORD using the value obtained above as the value. cheers, Jaime On Mon, Nov 18, 2013 at 5:26 PM, Giancarlo De Filippis <[email protected]>wrote: > Il 18/11/2013 15:25 Giancarlo De Filippis ha scritto: > > Hi all, > > i've build my first vm with centos 6.4 image. > > How i can setup the root password in vm? > > Thanks.. > > > -- > > *Giancarlo De Filippis* > LTBL S.r.L. > Cell. +39 320 8155325 > Uff. +39 02 89604424 > Fax +39 02 89954500 > __________________ > > > -- > > *Giancarlo De Filippis* > LTBL S.r.L. > Cell. +39 320 8155325 > Uff. +39 02 89604424 > Fax +39 02 89954500 > __________________ > > > _______________________________________________ > Users mailing list > [email protected] > http://lists.opennebula.org/listinfo.cgi/users-opennebula.org > > -- Jaime Melis Project Engineer OpenNebula - Flexible Enterprise Cloud Made Simple www.OpenNebula.org | [email protected]
_______________________________________________ Users mailing list [email protected] http://lists.opennebula.org/listinfo.cgi/users-opennebula.org
