【问题标题】:Using AD LDS over SSL [duplicate]通过 SSL 使用 AD LDS [重复]
【发布时间】:2016-04-04 12:01:22
【问题描述】:

我需要通过 SSL 配置 AD LDS 我正在尝试每篇文章,因为这两天 http://erlend.oftedal.no/blog/?blogid=7 似乎是合理的,但我一直坚持为证书授予 AD LDS 实例的读取权限。

这是官方文章,这第一步真的很模糊不知道该怎么办 https://msdn.microsoft.com/en-us/library/cc725767(v=ws.10).aspx#BKMK_1

我使用的是 Windows Server 2012 r2

【问题讨论】:

    标签: ssl active-directory ldap adlds


    【解决方案1】:

    我首先配置企业 CA,然后使用此页面上的指南完成此操作

    http://social.technet.microsoft.com/wiki/contents/articles/2980.ldap-over-ssl-ldaps-certificate.aspx#Reasons

    按以下顺序

    1. 发布支持服务器身份验证的证书

      在这一步的第 5 点是

      “5. 在复制模板对话框中,保留默认选中的 Windows Server 2003 Enterprise 选中状态,然后单击确定。”

      仔细选择您的相关操作系统,教程说保持默认,但我使用的是 Windows Server 2012 r2,所以我选择了我正在使用的那个。选择您的相关操作系统。

    2. 导出 LDAPS 证书并导入以用于 AD DS

    3. 验证 LDAPS 连接

    为什么需要通过 SSL 进行 ADLDS 连接?

    因为我希望用户更改他/她的 ADLDS 密码,所以使用 PrincipalContext 的非 SSL 连接不允许我这样做。所以现在我正在使用下面的代码,它就像一个魅力。

    PrincipalContext pc = new PrincipalContext(
                        ContextType.ApplicationDirectory,
                        "YourServerUrl:YourSSLPort",
                        "CN=YourPartitionName,DC=partition,DC=com",
                        ContextOptions.SimpleBind | ContextOptions.SecureSocketLayer,
                        "FullDistinguisedNameOfUser",
                        "PasswordOfUser");
    
    bool IsUserValidated = pc.ValidateCredentials(
                        "FullDistinguisedNameOfUser",
                        "PasswordOfUser",
                        ContextOptions.SimpleBind | ContextOptions.SecureSocketLayer);
    
    
                if (IsUserValidated)
                {
                    UserPrincipal up = UserPrincipal.FindByIdentity(
                    "FullDistinguisedNameOfUser", 
                    "PasswordOfUser");
    
                    up.ChangePassword("UserOldPassword", "UserNewPassword");
                }
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2023-03-02
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2015-11-05
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多