New Question
0

Let user set password without auto-generated password on initial boot

asked 2016-07-01 17:19:09 +0300

kvasko gravatar image

updated 2016-07-01 17:19:47 +0300

I cannot figure out how to configure the image to simply ask for the user to set the password and not have a default password (like in the one provided https://cloudbase.it/windows-cloud-im...).

I saw this, http://ask.cloudbase.it/question/865/... and then the CLI method
nova get-password <instance> <ssh_private_key> to get the default password. But I just want the user to provide a password on their first login.

edit retag flag offensive close merge delete

3 answers

Sort by » oldest newest most voted
0

answered 2016-08-07 09:04:38 +0300

Abdul gravatar image

Do sysprep with OOBE and Generalize and shutdown.

edit flag offensive delete link more
0

answered 2016-07-01 17:40:48 +0300

avladu gravatar image

Hello,

you need to set in the cloudbase-init configuration file the following:

[DEFAULT]

first_logon_behaviour=always

More information here: https://github.com/openstack/cloudbas... and here: https://cloudbase-init.readthedocs.io...

Thanks,

Adrian Vladu

edit flag offensive delete link more

Comments

I followed the instructions here, http://docs.openstack.org/image-guide/windows-image.html at what point in that process do I need to change that setting? I just executed the MSI file. I'll have to change this on the generated image manually I guess? (e.g. regenerate and change it on the image)?

kvasko gravatar imagekvasko ( 2016-07-01 18:25:24 +0300 )edit

You just need to change the cloudbase-init configuration file which is located at: C:\Program Files\Cloudbase Solutions\Cloudbase-Init\conf\cloudbase-init.conf

avladu gravatar imageavladu ( 2016-07-01 19:04:19 +0300 )edit

As long as you change the image before it boots it's fine, you don t need to fully regenerate the image.

avladu gravatar imageavladu ( 2016-07-01 19:46:39 +0300 )edit

how can you change it before it boots? Is it possible to extract the qcow2 image and change it?

kvasko gravatar imagekvasko ( 2016-07-01 20:00:34 +0300 )edit

On linux, with qemu-img you can convert it to raw, then with losetup, kpartx and mount you mount it, and then change the file content.

avladu gravatar imageavladu ( 2016-07-01 21:42:34 +0300 )edit

Doesn't seem to work. I added "first_logon_behavior=always" to the cloudbase-init.conf and to cloudbase-init-unattended.conf. I took this text from a booted image that was changed in OS which still made me decrypt the password. [DEFAULT] first_logon_behaviour=always inject_user_password=false

kvasko gravatar imagekvasko ( 2016-07-02 01:08:52 +0300 )edit

The only thing I want the user to do is type in a password. I'm going to try and redo the entire image to see if that works.

kvasko gravatar imagekvasko ( 2016-07-02 01:13:35 +0300 )edit

I recreated the image and still the same issue. It prompts me to input the current password (which I have to decrypt) and then change the pass. The config has first_logon_behaviour=always inside of cloudbase-init.conf inside the folder path of C:\Program Files\Cloudbase Solutions\Cloudbase-Init\conf

kvasko gravatar imagekvasko ( 2016-07-05 17:05:34 +0300 )edit
0

answered 2016-07-06 22:03:29 +0300

Hello @kvasko,

First of all please try with first_logon_behaviour=always instead of first_logon_behavior=always (it's missing an u).

If the problem it is still present could you send us the cloudbase-init log in order to get an overview regarding the context of this issue. Also it will be useful for us to know on what version of operating system are you trying this.

Thanks for using cloudbase-init, and sorry for this issue,
Alex

edit flag offensive delete link more

Comments

I fixed this issue but the issue still persists. It is still asking for a password when I boot the image. I'm trying this on Windows Server 2012 R2. Where can I get the cloudbase-init log? Would this be on the instance?

kvasko gravatar imagekvasko ( 2016-08-01 16:38:41 +0300 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2016-07-01 17:19:09 +0300

Seen: 4,815 times

Last updated: Aug 07 '16