New Question
0

Password is not set correctly

asked 2016-10-18 12:50:59 +0200

Alexander Birkner gravatar image

Hello,

I've build my own Windows Image (Windows 2012 R2 Standard) by following this guide: http://docs.openstack.org/image-guide...

I am creating my instances with metadata => {admin_pass => "MySpecialPassword123!@"}. My generated passwords are following the Windows password complexity requirements: https://technet.microsoft.com/en-us/l...

I want to use my own password passed by the Metadata Service of OpenStack.

I've set the following attributes in both configs:

  • C:\Program Files\Cloudbase Solutions\Cloudbase-Init\conf\cloudbase-init.conf
  • C:\Program Files\Cloudbase Solutions\Cloudbase-Init\conf\cloudbase-init-unattend.conf
inject_user_password=true
first_logon_behaviour=no
username=Administrator

The OpenStack Instance Log shows up also "Set password for existing user Administrator". Looks fine but I can't login with my metadata password and Windows still tells me to change my password after the login. I don't know why this happens because firstlogonbehaviour is set to "no".

As quick-fix I am setting my passwords via powershell by myself. But that solution is really dirty and I would recommend to use the build-in function.

Does anyone know what the problem can be?

Thank you!

Regards, Alexander

edit retag flag offensive close merge delete

Comments

I had a similar issue (I had a similar issue. http://ask.cloudbase.it/question/1298/let-user-set-password-without-auto-generated-password-on-initial-boot/ ) but never got a solution. I would be interested in seeing an answer to this as well.

kvasko gravatar imagekvasko ( 2016-10-20 00:11:23 +0200 )edit
kvasko gravatar imagekvasko ( 2016-10-20 00:11:39 +0200 )edit

On this part, can you provide the full cloudbase-init log and the version you are using, plus the metadata, as it seems there might be an issue with the metadata on your side, if you cannot even connect login (if I understood correctly). Thanks.

avladu gravatar imageavladu ( 2016-10-20 18:27:54 +0200 )edit

2 answers

Sort by » oldest newest most voted
0

answered 2016-10-20 00:00:23 +0200

avladu gravatar image

Hello,

can you put in a pastebin the cloudbase-init logs to debug the issue?

Thank you.

edit flag offensive delete link more
0

answered 2016-10-20 00:48:06 +0200

Hi I have the same behaviour. I was testing this today as well. Even if the parameter "firstlogonbehaviour" is set to "no", cloudbase still exexutes the piece of code that set the password as expired.

Cloudbase-init-unattended extract: inject_user_password=true first_logon_behaviour=no

Logs (the lines starting with ---> were added by me in the code before sysprep)

2016-10-19 10:05:09.507 1344 INFO cloudbaseinit.init [-] Executing plugin 'SetUserPasswordPlugin'
2016-10-19 10:05:09.507 1344 DEBUG cloudbaseinit.utils.classloader [-] Loading class 'cloudbaseinit.osutils.windows.WindowsUtils' load_class c:\program files\cloudbase solutions\cloudbase-init\python\lib\site-packages\cloudbaseinit\utils\classloader.py:27
2016-10-19 10:05:09.507 1344 DEBUG cloudbaseinit.metadata.services.base [-] Using cached copy of metadata: 'openstack/latest/meta_data.json' _get_cache_data c:\program files\cloudbase solutions\cloudbase-init\python\lib\site-packages\cloudbaseinit\metadata\services\base.py:102
2016-10-19 10:05:09.507 1344 WARNING cloudbaseinit.plugins.common.setuserpassword [-] Using admin_pass metadata user password. Consider changing it as soon as possible
---> 2016-10-19 10:05:09.522 1344 DEBUG cloudbaseinit.plugins.common.setuserpassword [-] <oslo_config.cfg.ConfigOpts object at 0x0000000001578668> _change_logon_behaviour c:\program files\cloudbase solutions\cloudbase-init\python\lib\site-packages\cloudbaseinit\plugins\common\setuserpassword.py:134
---> 2016-10-19 10:05:09.522 1344 DEBUG cloudbaseinit.plugins.common.setuserpassword [-] USER MUST CHANGE _change_logon_behaviour c:\program files\cloudbase solutions\cloudbase-init\python\lib\site-packages\cloudbaseinit\plugins\common\setuserpassword.py:141
2016-10-19 10:05:09.522 1344 DEBUG cloudbaseinit.utils.classloader [-] Loading class 'cloudbaseinit.osutils.windows.WindowsUtils' load_class c:\program files\cloudbase solutions\cloudbase-init\python\lib\site-packages\cloudbaseinit\utils\classloader.py:27
2016-10-19 10:05:09.538 1344 INFO cloudbaseinit.plugins.common.setuserpassword [-] Password succesfully updated for user administrator
2016-10-19 10:05:09.538 1344 INFO cloudbaseinit.plugins.common.setuserpassword [-] Cannot set the password in the metadata as it is not supported by this service
2016-10-19 10:05:09.538 1344 INFO cloudbaseinit.init [-] Executing plugin 'ConfigWinRMListenerPlugin'
edit flag offensive delete link more

Comments

hello, the setuserpassword plugin is executed by cloudbase-init using the cloudbase-init.conf file. Make sure you have the first_logon_behaviour=no put there. If you already have it and it doesn't work, can you provide the version of cbs-init you are using?

avladu gravatar imageavladu ( 2016-10-20 18:25:33 +0200 )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-10-18 12:50:59 +0200

Seen: 3,642 times

Last updated: Oct 20 '16