← Back to team overview

cloud-init team mailing list archive

Re: Qustion about using cloud-init to set root password for the deployed vm.

 

On Thu, 11 Jul 2013, Na Fei NF Yang wrote:


> Hi Scott,
> Thanks for your quick response, according to our requirement , we need the
> root password can be a random value
> when deploying instead of a fixed value that same as the one when capture
> the image. This will require cloud-init
> to change the root password at the first time when it is boot up .
> We have one ugly solution that put the change root password script to
> user-data and then cloud-init can execute the
> script  when boot up and then change the root password.
> It depend on you to provide the patch if it is possible . Thank you.

You can do this via the 'set_passwords' config module.
See syntax at doc/examples/cloud-config.txt [1]

--
[1] http://bazaar.launchpad.net/~cloud-init-dev/cloud-init/trunk/view/head:/doc/examples/cloud-config.txt#L522


References