Sysprep answerfile - creates account but I have to hack password reset


  1. Posts : 9
    Windows 10 + Mac OS
       #1

    Sysprep answerfile - creates account but I have to hack password reset


    Hi

    I have created a sysprep Windows 10 image after seeing the great Kari Finn sysprepping tutorial guide.

    I have encountered a problem and have clearly made a mistake.

    The part of the answer file covering the account creation is this:

    Code:
     <OOBE>
                    <HideEULAPage>true</HideEULAPage>
                    <HideOEMRegistrationScreen>true</HideOEMRegistrationScreen>
                    <HideOnlineAccountScreens>true</HideOnlineAccountScreens>
                    <HideWirelessSetupInOOBE>true</HideWirelessSetupInOOBE>
                    <ProtectYourPC>1</ProtectYourPC>
                </OOBE>
                <UserAccounts>
                    <LocalAccounts>
                        <LocalAccount wcm:action="add">
                            <DisplayName>co-admin</DisplayName>
                            <Group>Administrators</Group>
                            <Name>co-admin</Name>
                        </LocalAccount>
                    </LocalAccounts>
                </UserAccounts>
    The issues is, When I login after sysprepping, capturing and restoring the image, I am unable to login as there is a password I must give it which I have not set. So I am forced to reset the admin account password via hacks so as to be able to login.

    I am assuming that my handling of the answerfile password and login is incorrect. I can think of 2 solutions, the first one would be to have it autologon without a password on first boot, allowing me to set the admin account password afterwards. The second one would be to go through the OOBE. I think that the first idea might be better but I am not 100% certain.

    Any help would be much appreciated!

    Thanks

    John
      My Computers


  2. Posts : 17,661
    Windows 10 Pro
       #2

    When a user account is created in answer file without a password as in your case, Windows defaults to profile setting "User must change password at next logon", exactly the same default than if you create a new user in lusrmgr.msc (Local Users and Groups Manager):

    Sysprep answerfile - creates account but I have to hack password reset-new-user.jpg

    This means that when new user signs in first time, this will be shown:

    Sysprep answerfile - creates account but I have to hack password reset-first-logon.jpg

    Clicking OK brings user here:

    Sysprep answerfile - creates account but I have to hack password reset-change-password.jpg

    User can now enter new password, leaving the top most text field Password empty as there is no current password, then confirm the new password, and click the arrow button to sign in.

    If user wants to continue without password, just leave all text fields empty and click the arrow.

    Better of course is to create the password for the user in answer file, see step 4.8 in tutorial: Create media for automated unattended install of Windows 10

    You cannot set autologon in answer file for user without password. A password is required for autologon

    Kari
      My Computer


  3. Posts : 9
    Windows 10 + Mac OS
    Thread Starter
       #3

    Many thanks for your detailed reply Kari!

    Unfortunately I am not seeing this change password screen on initial login, it is demanding I give it a password. I did create an admin account 'co-admin' in audit mode while preparing the image, this was done using "local users and groups", I did not set a password when doing this. I have also added the same admin account to the answer file. That might be where I am going wrong - if I don't create any accounts while preparing the image, then this this might avoid the problem?

    Thanks again!
      My Computers


  4. Posts : 4,173
    Windows 11 Pro, 22H2
       #4

    conrad101,

    I've found some odd behavior with unattended setup when trying to set the password to a blank password, but I've been able to successfully work around it and get a one time autologon to work with it as well. Here is what I found:

    When you create the answer file using Windows SIM, you will note that if you do not enter a password, the password block will stay light colored indicating that it has not been set. Enter a password in the password field, making sure to hit Enter to set that password. Then, remove the password, again, hitting Enter to commit this change. You will now note that the password block is dark in color indicating that the value will be saved (in this case, a blank password).

    Works fine for me. In fact, I have multiple unattended setups and sysprep setups, all with no password specified AND all with a one time autologon to allow the installation to fully complete and all work great.
      My Computers


  5. Posts : 4,173
    Windows 11 Pro, 22H2
       #5

    One more thing to add:

    I took a look at my autounattend.xml file, and notice that you have no <password> entry, probably due to the issue I noted above. Here is what mine looks like:

    Code:
                <OOBE>
                    <HideEULAPage>true</HideEULAPage>
                    <HideOEMRegistrationScreen>true</HideOEMRegistrationScreen>
                    <HideOnlineAccountScreens>true</HideOnlineAccountScreens>
                    <HideWirelessSetupInOOBE>true</HideWirelessSetupInOOBE>
                    <ProtectYourPC>1</ProtectYourPC>
                    <UnattendEnableRetailDemo>false</UnattendEnableRetailDemo>
                </OOBE>
                <UserAccounts>
                    <LocalAccounts>
                        <LocalAccount wcm:action="add">
                            <DisplayName>Windows User</DisplayName>
                            <Group>Administrators</Group>
                            <Name>WinUser</Name>
                            <Password>
                                <Value>UABhAHMAcwB3AG8AcgBkAA==</Value>
                                <PlainText>false</PlainText>
                            </Password>
                        </LocalAccount>
                    </LocalAccounts>
                </UserAccounts>
                <TimeZone>Central Standard Time</TimeZone>
                <AutoLogon>
                    <Enabled>true</Enabled>
                    <LogonCount>1</LogonCount>
                    <Username>WinUser</Username>
                    <Password>
                        <Value>UABhAHMAcwB3AG8AcgBkAA==</Value>
                        <PlainText>false</PlainText>
                    </Password>
                </AutoLogon>
                <FirstLogonCommands>
                    <SynchronousCommand wcm:action="add">
                        <CommandLine>reg add &quot;HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon&quot; /v AutoLogonCount /t REG_DWORD /d 0 /f</CommandLine>
                        <Order>1</Order>
                    </SynchronousCommand>
                </FirstLogonCommands>
            </component>
      My Computers


  6. Posts : 9
    Windows 10 + Mac OS
    Thread Starter
       #6

    Thank you hsehestedt!

    I will need to go through this a bit thoroughly I think and I will reply in a day or two.
      My Computers


  7. Posts : 9
    Windows 10 + Mac OS
    Thread Starter
       #7

    Apologies for the delay in getting back to you hsehestedt!

    I've redone this while not making changes to the default admin account and incorporated a few parts from your answer file script and it works perfectly.

    Thank you very much for taking the time to answer me, and thanks again to Kari!
      My Computers


  8. Posts : 4,173
    Windows 11 Pro, 22H2
       #8

    Glad to hear it's working for you!
      My Computers


 

  Related Discussions
Our Sites
Site Links
About Us
Windows 10 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 10" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 10:37.
Find Us




Windows 10 Forums