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

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

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

在创建加入活动目录的 Windows 文件服务器文件系统之前,请使用亚马逊 A FSx ctive Directory 验证工具验证与您的 Active Directory 域的连接。FSx无论你使用的是带有 Amazon 托管 Microsoft Active Directory 的 Windows 文件服务器,还是使用FSx自我管理的 Active Directory 配置,你都可以使用这个测试。域控制器网络连接测试(测试-FSxADControllerConnection)不会对域中的每个域控制器运行全套网络连接检查。相反,应使用此测试针对一组特定的域控制器运行网络连接验证。

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

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

  3. Connect 连接到您的EC2实例。有关更多信息,请参阅亚马逊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. 将 A mazonFSx ADValidation 模块添加到当前会话。

    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