New Question
0

Password chaneg dialog before first logon [closed]

asked 2014-12-11 09:18:17 +0200

HD gravatar image

Hello,

With the latest build of cloudbase-init. i am gettting a prompt saying

Password must be changed at first logon

after the first boot. I have provided the AdministratorPassword in Answerfile. This problem doesn't occur for cloudbase-init build dated 15th Sep 2014. I moved to the latest build to get a fix for Administrator accounts issue on Spanish Windows OS. However the latest build has created this issue of Administrator not able to Autologon inspite of me using the same answerfile as before

-HD

edit retag flag offensive reopen merge delete

Closed for the following reason the question is answered, right answer was accepted by Claudiu Belu
close date 2016-11-11 13:03:45.350489

Comments

Hello, When you have installed cloudbase-init, have you checked the sysprep option? It might be the case that your AnswerFile(Unattend.xml) was replaced by the cloudbase-init one.

ader1990 gravatar imageader1990 ( 2014-12-11 15:35:24 +0200 )edit

Hi, we reverted the commit that caused this behaviour, so now you should have no issues in your scenario. Can you please test the latest installer?

alexpilotti gravatar imagealexpilotti ( 2014-12-12 13:32:01 +0200 )edit

Thanks a ton! It all works as it is meant to be :)

HD gravatar imageHD ( 2014-12-13 09:05:15 +0200 )edit

3 answers

Sort by » oldest newest most voted
0

answered 2014-12-11 16:00:43 +0200

HD gravatar image

Some snippet

CloudBase init is installed using

$serialPortName = @(Get-WmiObject Win32_SerialPort)[0].DeviceId

$p = Start-Process -Wait -PassThru -FilePath msiexec -ArgumentList "/i PATHTOMSI /qn /l*v PATHTOMSILOG LOGGINGSERIALPORTNAME=$serialPortName"

Next, I run C:\Program Files (x86)\Cloudbase Solutions\Cloudbase-Init\bin\SetSetupComplete.cmd

Then I run sysprep & "$ENV:SystemRoot\System32\Sysprep\Sysprep.exe" /generalize/oobe /shutdown/unattend:"$LocalUnattendFile"

I am not able to attach the $LocalUnattendFile

Its a standard autounattend.xml with oobe and specialize pass <unattend xmlns="urn:schemas-microsoft-com:unattend"> <settings pass="generalize"> <component name="Microsoft-Windows-PnpSysprep" processorarchitecture="amd64" publickeytoken="31bf3856ad364e35" language="neutral" versionscope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <persistalldeviceinstalls>true</persistalldeviceinstalls> </component> </settings> <settings pass="oobeSystem"> <component name="Microsoft-Windows-Shell-Setup" processorarchitecture="amd64" publickeytoken="31bf3856ad364e35" language="neutral" versionscope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State"> <oobe> <hideeulapage>true</hideeulapage> <networklocation>Work</networklocation> <protectyourpc>1</protectyourpc> <skipmachineoobe>true</skipmachineoobe> <skipuseroobe>true</skipuseroobe> </oobe> <useraccounts> <administratorpassword> <value>Pa55word$</value> <plaintext>true</plaintext> </administratorpassword> </useraccounts> <autologon> <password> <value>Pa55word$</value> <plaintext>true</plaintext> </password> <enabled>true</enabled> <logoncount>1</logoncount> <username>Administrator</username> </autologon> </component> </settings> <settings pass="specialize"> <component name="Microsoft-Windows-Deployment" processorarchitecture="amd64" publickeytoken="31bf3856ad364e35" language="neutral" versionscope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <runsynchronous> <runsynchronouscommand wcm:action="add"> <order>1</order> <path>powershell -NoLogo -Command "Set-ExecutionPolicy Unrestricted -force"</path> <description>Set-ExecutionPolicy to unrestricted</description> </runsynchronouscommand> <runsynchronouscommand wcm:action="add"> <order>2</order> <path>"C:\Program Files (x86)\Cloudbase Solutions\Cloudbase-Init\Python27\Scripts\cloudbase-init.exe" --config-file "C:\Program Files (x86)\Cloudbase Solutions\Cloudbase-Init\conf\cloudbase-init-unattend.conf"</path> <description>Run Cloudbase-Init to set the hostname</description> <willreboot>Always</willreboot> </runsynchronouscommand> </runsynchronous> </component> </settings> </unattend>

After syspreping, I copy the image to openstack and then try to create an instance. The oobe pass should set the administrator password. All this works with Cloud base init build of 15 Sep 2014. With the latest cloud-base msi, the machine boots up coreectly, but the Administrator doesn't get autologged on. Also, I see a message on colsole saying Administrator must change password. Once I change the password, everything works.

The gotcha is I want Administrator account to autologon.

edit flag offensive delete link more
0

answered 2014-12-11 14:48:46 +0200

alexpilotti gravatar image

updated 2014-12-11 14:51:15 +0200

Hi, can you please post your cloudbase-init.log?

Can you also post a copy of your user_data script? (called AnswerFile in your post, if I understood correctly)

Thanks

edit flag offensive delete link more

Comments

There is nothing in the user_data script. The answerfile is the autounattend.xml that is passed to sysprep before the final shutdown of the vm which will be used as an image to create instances

HD gravatar imageHD ( 2014-12-11 16:02:19 +0200 )edit
0

answered 2014-12-11 18:09:04 +0200

ader1990 gravatar image

During the install process we are setting the registry key HKLM\System\Setup!UnattendFile with the value "<cloudbase-init config="" folder="">\Unattend.xml", in order to make sure the cloudbase-init unattend file has the highest priority and to avoid a short path issue. That may be the problem and we are checking now. to confirm/fix this issue.

In the mean time, you could copy your AnswerFile from $LocalUnattendFile to "<cloudbase-init config="" folder="">\Unattend.xml" and try to run "$ENV:SystemRoot\System32\Sysprep\Sysprep.exe" /generalize/oobe /shutdown again, that should work and get your environment working as expected.

In order to know what answer file is used, can you post the contents of these files? C:\Windows\Panther\setupact.log C:\Windows\Panther\UnattendGC\setupact.log

As you cannot attach files and there is no formatting on the comments, I'd suggest pastebin.com or paste.openstack.org .

Thanks.

edit flag offensive delete link more

Comments

try to run "$ENV:SystemRoot\System32\Sysprep\Sysprep.exe" /generalize/oobe /shutdown again, that should work and get your environment working as expected. So u want me to pass the /unattend:filepath param to sysprep?

HD gravatar imageHD ( 2014-12-12 16:25:14 +0200 )edit

Question Tools

Stats

Asked: 2014-12-11 09:18:17 +0200

Seen: 3,913 times

Last updated: Dec 11 '14