原文地址:http://hi.baidu.com/lllangxx/item/3ccb7cdfa13b56eb3dc2cb39

一、学习如何管理Active Directory

Active Directory 循序渐进系列指南

二、ADExplorer

到网上下载一个ADExplorer,它是Active Directory浏览器,可以让我们更加清楚认识Active Directory的数据存储方式及格式。

三、域外访问Active Directory

确保将域外计算机的 DNS 分析 程序配置 为与 Active Directory 运用 相同的 DNS 名称服务器;在大多数情况下,假定您要运用 Active Directory 集成的 DNS,则我们把此域外计算机的DNS设置为此Active Directory服务器IP地址。

详细内容请参照《 运用 Active Directory 执行 Linux 客户端身份验证 》

四、php 代码

为了使用方便,我使用 adLDAP 来进行编程,这样可以简便很多。

<?php
require_once(dirname(__FILE__) . '/adLDAP.php'); $options=array();
try {
$options['account_suffix']="@mydomain.com";
$options['base_dn']="OU=Accounts,DC=mydomain,DC=com";//
$options['domain_controllers']=array("mydomain.com");
$options['ad_username']="administrator";
$options['ad_password']="123456";
$ldap = new adLDAP($options);
}
catch (adLDAPException $e) {
echo $e; exit();
}
//var_dump($ldap); echo ("<pre>\n");
$result=$ldap->authenticate("qiujiayu","qiujiayu");
var_dump($result);
echo("----------------------------------------------------");
$result=$ldap->folder_list(array('Marketing'), ADLDAP_FOLDER, true,'contact');
var_dump ($result);
echo("----------------------------------------------------"); $result=$ldap->all_users();
var_dump ($result);
echo("----------------------------------------------------"); $result=$ldap->all_contacts();
var_dump ($result);
echo(json_encode( ($ldap->contact_info($result[0],array('telephonenumber')))));
echo("----------------------------------------------------");
?>

PHP 通过LDAP协议,操作Windows Active Directory的更多相关文章

  1. Solaris与Windows Active Directory集成

    通过Solaris与Active Directory的集成,Solaris可以使用Windows 2003 R2/ 2008 Active Directory来进行用户登录验证.以下是简要配置过程. ...

  2. How to use the windows active directory to authenticate user via logon form 如何自定义权限系统,使用 active directory验证用户登录

    https://www.devexpress.com/Support/Center/Question/Details/Q345615/how-to-use-the-windows-active-dir ...

  3. Active Directory的LDAP协议与DN(Distinguished Name)详解

    前言 光copy几段代码的文章没什么意思,本章上最基础的代码,主要是为了从编程方面聊LDAP和DN,其它的后面聊,一步步慢慢来吧. Active Directory编程须知 1.域控服务器: Wind ...

  4. 安装 Windows Server 2012 Active Directory 只读域控制器 (RODC)(级别 200)

    安装 Windows Server 2012 Active Directory 只读域控制器 (RODC)(级别 200) 适用对象:Windows Server 2012 本主题介绍如何创建分步的 ...

  5. Active Directory: LDAP Syntax Filters

    LDAP syntax filters can be used in many situations to query Active Directory. They can be used in VB ...

  6. 在kerberos认证过程中Active Directory的作用

    LDAP介绍 1),ladp(Lightweight Directory Access Protocol),轻量级目录访问协议,提供被称为目录服务的信息服务,特别是基于X.500(构成全球分布式的目录 ...

  7. CAS FOR WINDOW ACTIVE DIRECTORY SSO单点登录

    一.CAS是什么? CAS(Central Authentication Service)是 Yale 大学发起的一个企业级的.开源的项目,旨在为 Web 应用系统提供一种可靠的单点登录解决方法(支持 ...

  8. AD域和LDAP协议

    随着我们的习大大上台后,国家在网络信息安全方面就有了很明显的改变!所以现在好多做网络信息安全产品的公司和需要网络信息安全的公司都会提到用AD域服务器来验证,这里就简单的研究了一下! 先简单的讲讲AD域 ...

  9. 用JAVA 查询 Active Directory(AD)

    Required Details LDAP address (For e.g.: myjeeva.com or IP of the Domain Controller/Global Catalog[G ...

随机推荐

  1. Springboot项目与vue项目整合打包

    我的环境 * JDK 1.8 * maven 3.6.0 * node环境 1.为什么需要前后端项目开发时分离,部署时合并? 在一些公司,部署实施人员的技术无法和互联网公司的运维团队相比,由于各种不定 ...

  2. 53.FIB词链

    时间限制: 1 s 空间限制: 128000 KB 题目等级 : 大师 Master 题解 题目描述 Description Fibonacci词定义如下:FIB1 = b  FIB2 = a 当k  ...

  3. List与ArrayList的区别

    http://www.cnblogs.com/aisiteru/articles/1151874.html List是一个接口,而ListArray是一个类. ListArray继承并实现了List. ...

  4. MOSFET pair makes simple SPDT switch

    With an n- and p-channel MOSFET, you can easily implement a single-pole double-throw (SPDT) switch t ...

  5. Ruby:Sublime中开发Ruby需要注意的Encoding事项

    背景 最近在用Sublime作为开发环境学习Ruby,本文就记录一下Ruby和Sublime在编码方面的问题. Sublime相关 默认的文件存储编码:UTF8 Sublime文件默认存储编码为UTF ...

  6. Django的restful api三方包:djangorestframework

    文档位置:https://www.django-rest-framework.org/ 代码位置:https://github.com/encode/django-rest-framework/tre ...

  7. TYVJ 2002 扑克牌 题解

    P2002 扑克牌 时间: 1000ms / 空间: 131072KiB / Java类名: Main 背景 Admin生日那天,Rainbow来找Admin玩扑克牌……玩着玩着Rainbow觉得太没 ...

  8. getaddrinfo详解

    #include <sys/socket.h> #include <netdb.h> int getaddrinfo(const char *restrict nodename ...

  9. go语言基础之闭包捕获外部变量特点

    1.闭包捕获外部变量特点 示例: package main //必须 import "fmt" func main() { a := 10 str := "mike&qu ...

  10. TensorFlow进阶(五)---图与会话

    图与会话 图 tf.Graph TensorFlow计算,表示为数据流图.一个图包含一组表示 tf.Operation计算单位的对象和tf.Tensor表示操作之间流动的数据单元的对象.默认Graph ...