验证与 Active Directory 域控制器的连接 - Amazon FSx for Windows File Server
Amazon Web Services 文档中描述的 Amazon Web Services 服务或功能可能因区域而异。要查看适用于中国区域的差异,请参阅 中国的 Amazon Web Services 服务入门 (PDF)

本文属于机器翻译版本。若本译文内容与英语原文存在差异,则一律以英文原文为准。

验证与 Active Directory 域控制器的连接

在创建已加入 Active Directory 的 FSx for Windows File Server 文件系统之前,请使用 Amazon FSx Active Directory 验证工具来验证与 Active Directory 域之间的连接。无论你是在托管 Microsoft Active Directory 中使用适用于 Windows File Server Amazon 的 FSx,还是使用自我管理的 Active Directory 配置,你都可以使用这个测试。域控制器网络连接测试 (test-fsXADControllerConnection) 不会对域中的每个域控制器运行全套网络连接检查。相反,应使用此测试针对一组特定的域控制器运行网络连接验证。

验证与 Active Directory 域控制器的连接
  1. 在同一个子网中,启动一个具有相同 Amazon VPC 安全组且您要将其用于 FSx for Windows File Server 文件系统的 Amazon EC2 Windows 实例。对于多可用区部署类型,请使用首选活动文件服务器的子网。

  2. 将 EC2 Windows 实例加入 Active Directory 有关更多信息,请参阅《Amazon Directory Service 管理指南》中的手动加入 Windows 实例

  3. 连接到您的 EC2 实例。有关更多信息,请参阅《适用于 Windows 实例的 Amazon EC2 用户指南》中的连接到 Windows 实例

  4. 在 EC2 实例上打开 Windows PowerShell 窗口(使用以管理员身份运行)。

    要测试是否安装了 Windows 所需 PowerShell 的 Active Directory 模块,请使用以下测试命令。

    PS C:\> Import-Module ActiveDirectory

    如果上一操作返回错误,请使用以下命令进行安装。

    PS C:\> Install-WindowsFeature RSAT-AD-PowerShell
  5. 使用以下命令下载网络验证工具。

    PS C:\> Invoke-WebRequest "https://docs.aws.amazon.com/fsx/latest/WindowsGuide/samples/AmazonFSxADValidation.zip" -OutFile "AmazonFSxADValidation.zip"
  6. 使用以下命令下载 zip 文件。

    PS C:\> Expand-Archive -Path "AmazonFSxADValidation.zip"
  7. 将 AmazonFSxADValidation 模块添加到当前会话。

    PS C:\> Import-Module .\AmazonFSxADValidation
  8. 设置 Active Directory 域控制器 IP 地址的值,然后使用以下命令运行连接测试:

    $ADControllerIp = '10.0.75.243' $Result = Test-FSxADControllerConnection -ADControllerIp $ADControllerIp
  9. 以下示例所示为检索包含结果为连接测试成功的测试输出。

    PS C:\AmazonFSxADValidation> $Result Name Value ---- ----- TcpDetails {@{Port=88; Result=Listening; Description=Kerberos authentication}, @{Port=135; Resul... Server 10.0.75.243 UdpDetails {@{Port=88; Result=Timed Out; Description=Kerberos authentication}, @{Port=123; Resul... Success True PS C:\AmazonFSxADValidation> $Result.TcpDetails Port Result Description ---- ------ ----------- 88 Listening Kerberos authentication 135 Listening DCE / EPMAP (End Point Mapper) 389 Listening Lightweight Directory Access Protocol (LDAP) 445 Listening Directory Services SMB file sharing 464 Listening Kerberos Change/Set password 636 Listening Lightweight Directory Access Protocol over TLS/SSL (LDAPS) 3268 Listening Microsoft Global Catalog 3269 Listening Microsoft Global Catalog over SSL 9389 Listening Microsoft AD DS Web Services, PowerShell

    以下示例所示为运行测试以及获得失败的结果。

    PS C:\AmazonFSxADValidation> $Result = Test-FSxADControllerConnection -ADControllerIp $ADControllerIp WARNING: TCP 9389 failed to connect. Required for Microsoft AD DS Web Services, PowerShell. Verify security group and firewall settings on both client and directory controller. WARNING: 1 ports failed to connect to 10.0.75.243. Check pre-requisites in https://docs.aws.amazon.com/fsx/latest/WindowsGuide/self-managed-AD.html#self-manage-prereqs PS C:\AmazonFSxADValidation> $Result Name Value ---- ----- TcpDetails {@{Port=88; Result=Listening; Description=Kerberos authentication}, @{Port=135; Resul... Server 10.0.75.243 UdpDetails {@{Port=88; Result=Timed Out; Description=Kerberos authentication}, @{Port=123; Resul... Success False FailedTcpPorts {9389} PS C:\AmazonFSxADValidation> $Result.FailedTcpPorts 9389 ``` Windows socket error code mapping https://msdn.microsoft.com/en-us/library/ms740668.aspx