I'm trying to do this on ubuntu, i did what you said i've created file names init.sh upload it to Files and named there init.sh too. Next i applied it to template ($FILE[IMAGE_ID=10]) added ROOT_PASSWORD base 64 encoded and it doesn't work :(
My init.sh: #!/bin/bash usermod -p "$ROOT_PASSWORD" root But it didn't work. 2014-04-02 11:37 GMT+02:00 Jaime Melis <jme...@opennebula.org>: > Leszek, > > Create a script, call it "init.sh", upload it to the Files & Kernel tab > (as a Context type). Select it under the Context -> Files section of the VM > Template. > > Whatever you put inside that init.sh script will get executed. > > The contents of the script depend on the distro you are using, but if > you're using CentOS 6, for instance, you might want to write something like > this: > > > #!/bin/bash > > echo "root:$ROOT_PASSWORD" | passwd > > And then you can specify the custom variable ROOT_PASSWORD in the VM > Template. > > Please note that it's recommended to use base64 encoding for this type > of things, since otherwise it might lead to character problems. > > > > > > On Wed, Apr 2, 2014 at 11:09 AM, Leszek Master <keks...@gmail.com> wrote: > >> How can i push root password to a VM for example using context? >> >> _______________________________________________ >> Users mailing list >> Users@lists.opennebula.org >> http://lists.opennebula.org/listinfo.cgi/users-opennebula.org >> >> > > > -- > Jaime Melis > Project Engineer > OpenNebula - Flexible Enterprise Cloud Made Simple > www.OpenNebula.org | jme...@opennebula.org >
_______________________________________________ Users mailing list Users@lists.opennebula.org http://lists.opennebula.org/listinfo.cgi/users-opennebula.org