Windows 7 客户端无法加入服务器的 Active Directory 域

Windows 7 客户端无法加入服务器的 Active Directory 域

我目前正在帮助我的公司通过网络制作 Windows 自动安装原型。我使用的是 Server 2008r2 和 Windows 部署服务,客户端计算机上安装的是 Windows 7 操作系统。除了将客户端 PC 加入域之外,一切运行正常。DNS 配置正确,客户端计算机已在 Active Directory 计算机中预置为用户“Client1”,密码为“password”。我已发布我的无人值守 xml 文件以及 Panther/UnattendGC setupact.log 和 setuperr.log 文件的相关部分。

安装日志

2017-06-29 09:25:04,信息 [DJOIN.EXE] 无人值守加入:开始

2017-06-29 09:25:04,信息 [DJOIN.EXE] 无人参与连接:正在加载输入参数...

2017-06-29 09:25:04,信息 [DJOIN.EXE] 无人值守加入:AccountData = [NULL]

2017-06-29 09:25:04,信息 [DJOIN.EXE] 无人值守加入:UnsecureJoin = [NULL]

2017-06-29 09:25:04,信息 [DJOIN.EXE] 无人值守加入:MachinePassword = [秘密未记录]

2017-06-29 09:25:04,信息 [DJOIN.EXE] 无人参与加入:JoinDomain = [master.local]

2017-06-29 09:25:04,信息 [DJOIN.EXE] 无人参与加入:JoinWorkgroup = [NULL]

2017-06-29 09:25:04,信息 [DJOIN.EXE] 无人值守加入:域 = [master.local]

2017-06-29 09:25:04,信息 [DJOIN.EXE] 无人值守加入:用户名 = [Client1]

2017-06-29 09:25:04,信息 [DJOIN.EXE] 无人值守加入:密码 = [秘密未记录]

2017-06-29 09:25:04,信息 [DJOIN.EXE] 无人参与加入:MachineObjectOU = [NULL]

2017-06-29 09:25:04,信息 [DJOIN.EXE] 无人值守加入:DebugJoin = [false]

2017-06-29 09:25:04,信息 [DJOIN.EXE] 无人值守加入:DebugJoinOnlyOnThisError = [NULL]

2017-06-29 09:25:04,信息 [DJOIN.EXE] 无人参与加入:检查自动启动服务是否已启动。

2017-06-29 09:25:04,信息 [DJOIN.EXE] 无人参与加入:加入域 [master.local]...

2017-06-29 09:25:04,信息 [DJOIN.EXE] 无人参与加入:正在为 master.local 调用 DsGetDcName……

2017-06-29 09:25:04,警告 [DJOIN.EXE] 无人参与加入:DsGetDcName 失败:0x2746,最后一个错误为 0x0,将在 5 秒后重试... [[[我的个人说明:此时它会重试并显示上述错误多次,然后最终退出]]]

2017-06-29 09:32:04,错误 [DJOIN.EXE] 无人值守加入:NetJoinDomain 失败错误代码为 [10054]

2017-06-29 09:32:04,错误 [DJOIN.EXE] 无人值守加入:无法加入;gdwError = 0x2746

2017-06-29 09:32:04,信息 [DJOIN.EXE] 无人值守加入:退出,返回 0x0

安装错误日志

2017-06-29 09:32:04,错误 [DJOIN.EXE] 无人值守加入:NetJoinDomain 失败错误代码为 [10054]

2017-06-29 09:32:04,错误 [DJOIN.EXE] 无人值守加入:无法加入;gdwError = 0x2746

无人值守文件

<?xml version='1.0' encoding='utf-8'?> <unattend xmlns="urn:schemas-microsoft-com:unattend"> <settings pass="specialize" wasPassProcessed="true"> <component name="Microsoft-Windows-Shell-Setup" 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"> <AutoLogon> <Password>*SENSITIVE*DATA*DELETED*</Password> <Domain>master.local</Domain> <Enabled>true</Enabled> <LogonCount>5</LogonCount> <Username>Client1</Username> </AutoLogon> <RegisteredOrganization>MyCompany</RegisteredOrganization> <RegisteredOwner>MyCompany</RegisteredOwner> <TimeZone>eastern standard time</TimeZone> <ComputerName></ComputerName> <ProductKey>*SENSITIVE*DATA*DELETED*</ProductKey> </component> <component name="Microsoft-Windows-DNS-Client" 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"> <Interfaces> <Interface wcm:action="add"> <DNSServerSearchOrder> <IpAddress wcm:action="add" wcm:keyValue="1">122.45.36.1</IpAddress> </DNSServerSearchOrder> <DisableDynamicUpdate>false</DisableDynamicUpdate> <DNSDomain>master.local</DNSDomain> <EnableAdapterDomainNameRegistration>true</EnableAdapterDomainNameRegistration> <Identifier>Local Area Connection</Identifier> </Interface> </Interfaces> <DNSDomain>master.local</DNSDomain> <UseDomainNameDevolution>false</UseDomainNameDevolution> <DNSSuffixSearchOrder> <DomainName wcm:action="add" wcm:keyValue="1">master.local</DomainName> </DNSSuffixSearchOrder> </component> <component name="Microsoft-Windows-UnattendedJoin" 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"> <Identification> <Credentials> <Domain>master.local</Domain> <Password>*SENSITIVE*DATA*DELETED*</Password> <Username>Client1</Username> </Credentials> <JoinDomain>master.local</JoinDomain> <DebugJoin>false</DebugJoin> </Identification> </component> </settings> <settings pass="oobeSystem" wasPassProcessed="true"> <component name="Microsoft-Windows-Shell-Setup" 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"> <Display> <ColorDepth>32</ColorDepth> <DPI>96</DPI> <HorizontalResolution>1280</HorizontalResolution> <RefreshRate>60</RefreshRate> <VerticalResolution>1024</VerticalResolution> </Display> <UserAccounts> <AdministratorPassword>*SENSITIVE*DATA*DELETED*</AdministratorPassword> <DomainAccounts> <DomainAccountList wcm:action="add"> <Domain>master.local</Domain> <DomainAccount wcm:action="add"> <Group>Domain Users</Group> <Name>Client1</Name> </DomainAccount> </DomainAccountList> </DomainAccounts> <LocalAccounts> <LocalAccount wcm:action="add"> <Password>*SENSITIVE*DATA*DELETED*</Password> <Description>MyCompany</Description> <DisplayName>MyCompany</DisplayName> <Name>MyCompany</Name> <Group>Administrators</Group> </LocalAccount> </LocalAccounts> </UserAccounts> <TimeZone>eastern standard time</TimeZone> <RegisteredOwner>MyCompany</RegisteredOwner> <RegisteredOrganization>MyCompany</RegisteredOrganization> <OOBE> <HideEULAPage>true</HideEULAPage> <HideWirelessSetupInOOBE>true</HideWirelessSetupInOOBE> <NetworkLocation>Work</NetworkLocation> <ProtectYourPC>1</ProtectYourPC> </OOBE> </component> <component name="Microsoft-Windows-International-Core" 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"> <InputLocale>en-us</InputLocale> <SystemLocale>en-us</SystemLocale> <UILanguage>en-us</UILanguage> <UILanguageFallback>en-us</UILanguageFallback> <UserLocale>en-us</UserLocale> </component> </settings> <cpi:offlineImage cpi:source="catalog://51esm549353-6/reminst/wdsclientunattend/windows 7 professional_windows 7 professional.clg" xmlns:cpi="urn:schemas-microsoft-com:cpi"></cpi:offlineImage> </unattend>

我已经尝试过将其设置为 true,但仍然不起作用。值得注意的是,当我将 UnsecureJoin 设置为 true 时,我没有包含凭据,因为在执行 UnsecureJoin 时不应该包含凭据。此外,我尝试了 UnsecureJoin=true 的变体,将 MachinePassword 设置为该计算机的本地管理员帐户密码,并将 MachinePassword 字段留空,但仍然不起作用。

有人能帮我弄清楚为什么客户端电脑根本没有加入域吗?此外,DsGetDCName 错误代码 0x2746 和 NetJoinDomain 错误代码 10054 似乎没有记录,因此,如果您能对这些错误代码有任何见解,我将不胜感激。

答案1

以下是我执行此操作的方法:在 WDS 中,应答文件有两个不同的部分,我通常将它们保存在单独的文件中 - winPE 位(连接到服务器、分区磁盘、将文件复制到工作站、设置不安全连接)和 OOBE 位(设置本地密码、语言环境、完成域连接)。您将 PE 文件链接到计算机或全局设置它,然后将 OOBE 文件链接到“允许无人值守安装”位中的图像。

以下是我关于 WDS 的杂记链接

这是我的文件:PE.xml(用于 UEFI - 您需要更改驱动器分区以进行非 UEFI 启动):

    <?xml version="1.0" encoding="utf-8"?>
<unattend xmlns="urn:schemas-microsoft-com:unattend" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State">
    <settings pass="windowsPE">
        <component name="Microsoft-Windows-Setup" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" processorArchitecture="amd64">
            <WindowsDeploymentServices>
                <Login>
                    <WillShowUI>OnError</WillShowUI>
                    <Credentials>
                        <Username>wdsinst</Username>
                        <Domain>beastquest.com</Domain>
                        <Password>AbCd1234</Password>
                    </Credentials>
                </Login>
                <ImageSelection>
                    <WillShowUI>OnError</WillShowUI>
                    <InstallImage>
                        <ImageGroup>Win10</ImageGroup>
                        <ImageName>Win10x64take5</ImageName>
                        <Filename>win10x64take5.wim</Filename>
                    </InstallImage>
                    <InstallTo>
                        <DiskID>0</DiskID>
                        <PartitionID>3</PartitionID>
                    </InstallTo>
                </ImageSelection>
            </WindowsDeploymentServices>
            <DiskConfiguration>
                <WillShowUI>OnError</WillShowUI>
                <Disk wcm:action="add">
                   <CreatePartitions>
                       <CreatePartition wcm:action="add">
                           <Type>EFI</Type> 
                           <Size>200</Size> 
                           <Order>1</Order> 
                       </CreatePartition>
                       <CreatePartition wcm:action="add">
                            <Order>2</Order> 
                            <Size>128</Size> 
                            <Type>MSR</Type> 
                       </CreatePartition>
                       <CreatePartition wcm:action="add">
                            <Extend>true</Extend> 
                            <Order>3</Order> 
                            <Type>Primary</Type> 
                       </CreatePartition>
                  </CreatePartitions>
                    <ModifyPartitions>
                        <ModifyPartition wcm:action="add">
                            <Active>true</Active>
                            <Format>FAT32</Format>
                            <Label>EFI</Label>
                            <Order>1</Order>
                            <PartitionID>1</PartitionID>
                        </ModifyPartition>
                        <ModifyPartition wcm:action="add">
                            <Order>2</Order>
                            <PartitionID>3</PartitionID>
                            <Format>NTFS</Format>
                            <Label>Windows</Label>
                        </ModifyPartition>
                    </ModifyPartitions>
                    <DiskID>0</DiskID>
                    <WillWipeDisk>true</WillWipeDisk>
                </Disk>
            </DiskConfiguration>
 <ImageInstall>
 <OSImage>
 <InstallTo>
 <PartitionID>3</PartitionID> 
 <DiskID>0</DiskID> 
 </InstallTo>
 </OSImage>
 </ImageInstall>
        </component>
        <component name="Microsoft-Windows-International-Core-WinPE" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" processorArchitecture="amd64">
      <SetupUILanguage>
 <UILanguage>en-US</UILanguage>
   </SetupUILanguage>
    </component>
    </settings>
</unattend>

更改图像细节以适合您的图像。

和 OOBE.xml:将其链接到您上面指定的安装映像(作为允许无人值守文件):)

    <?xml version="1.0" encoding="utf-8"?>
<unattend xmlns="urn:schemas-microsoft-com:unattend">
    <settings pass="specialize">
        <component name="Microsoft-Windows-UnattendedJoin" 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">
            <Identification>
                <UnsecureJoin>true</UnsecureJoin>
            </Identification>
        </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" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
            <OOBE>
                <HideEULAPage>true</HideEULAPage>
                <NetworkLocation>Work</NetworkLocation>
                <ProtectYourPC>1</ProtectYourPC>
                <SkipMachineOOBE>true</SkipMachineOOBE>
                <SkipUserOOBE>true</SkipUserOOBE>
            </OOBE>
        </component>
    </settings>
    <cpi:offlineImage cpi:source="catalog:c:/win7-64bit/sources/install_windows 7 professional.clg" xmlns:cpi="urn:schemas-microsoft-com:cpi" />
</unattend>

您还需要向 WDSInst 帐户授予一些权限,以便它可以管理 AD 中的计算机帐户。在 WDS 服务器属性中设置您想要创建新计算机帐户的 OU,然后向 wdsinst 授予该 OU 的委派权限。该帐户将需要:

  • 在此 + 所有子 OU 中创建/删除计算机帐户
  • 在此 + 所有子 OU 中,对计算机对象执行以下操作的权限:
    • 读/写帐户限制
    • 验证写入 SPN 和 DNS 主机名
    • 修改+重置密码

您不能使用域管理员帐户。您需要授予 wdsinst 尽可能少的权限,因为这些应答文件不是超级安全的(我认为 PE 是通过 TFTP 传输的)。

这适用于 Win7 -> win10

相关内容