WINDOWS下搭建LDAP服务器

http://blog.youkuaiyun.com/gzaqq/archive/2007/06/20/1659717.aspx

 

 

原文地址: http://mguessan.free.fr/nt/openldap_en.html

LDAP服务器:http://download.bergmans.us/openldap/openldap-2.2.29/openldap-2.2.29-db-4.3.29-openssl-0.9.8a-win32_Setup.exe

 还要修改一个地方:在slapd.conf中把include         ./schema/core.schema改成:

include         ./schema/core.schema
include         ./schema/cosine.schema
include         ./schema/misc.schema
include         ./schema/inetorgperson.schema

原文:

Many commercial solutions are available to build an LDAP directory. However most products are either very expensive or not standards compliant (e.g. Active Directory).

OpenLDAP is an Opensource LDAP server designed for Unix platforms. A Windows release of this solution would be valuable for those who are stuck to a Microsoft Windows environment.

Thanks to Lucas Bergman, from FiveSight , such release is available. He developed the necessary patches and build process to deliver a binary package ready for use. The initial version hosted at FiveSight is no longer available, but Lucas keeps working on the windows port and built a new release, complete with installer: ( http://lucas.bergmans.us/hacks/openldap/ ). Lucas is now lucky enough to work mainly on Unix and Matthias Mohr has taken the lead. His updated builds are available at: http://download.bergmans.us/openldap/openldap-2.2.29/openldap-2.2.29-db-4.3.29-openssl-0.9.8a-win32_Setup.exe

For the impatients, or those who don't want to bother with config files, the Ilex company released another version with a more comprehensive installer, but an older version of OpenLDAP. This package is available at: http://www.ilex.fr/openldap.htm .

Installation

Download the OpenLDAP installer from: http://download.bergmans.us/openldap/openldap-2.2.29/openldap-2.2.29-db-4.3.29-openssl-0.9.8a-win32_Setup.exe .

Launch the installer, select language, accept license and choose target installation directory. The default is: c:\Program Files\OpenLDAP . As spaces in directory names usually lead to trouble, choose another place, e.g. c:\openldap .

Matthias improved the installer to automatically register OpenLDAP as an NT service and install BDB tools. Those are useful to fix a broken database after a system crash.

 

The installer let you choose service start up mode (auto or manual) and automatically builds a valid configuration. The OpenLDAP start up files are stored in c:\openldap\run , the directory data files end up in c:\openldap\var\openldap-data .

Configuration

The main OpenLDAP configuration file is slapd.conf . It has to be customized before launching the server.

This is just a quick start guide, please have a look at the official OpenLDAP documentation for more information.

Specify the Unicode data directory, by default: ./ucdata .
Choose the needed LDAP schemas. Schemas define directory structure, like columns and tables in a relational database. The core schema is mandatory, add the java schema if you intend to use OpenLDAP as a JNDI server.
Configure the path for OpenLDAP pid and args start up files. The first contains the server pid, the second includes command line arguments.
Choose the database type, by default bdb (Berkeley DB).
Specify the server suffix. All entries in the directory will have this suffix, which represents the root of the directory tree. For example, with suffix "dc=guessant,dc=org" , the fully qualified name of all entries in the database will end with: dc=guessant,dc=org .
Define the name of the administrator entry for the server, named the rootdn , along with its password rootpw . This is the super user of the server. The rootdn name must match the suffix defined above. As stated, all entry names must end with the suffix, and the rootdn is an entry.
Example configuration file:

ucdata-path ./ucdata
include ./schema/core.schema

pidfile ./run/slapd.pid
argsfile ./run/slapd.args

database bdb
suffix "dc=guessant,dc=org"
rootdn "cn=Manager,dc=guessant,dc=org"
rootpw secret
directory ./dataStartup

The slapd.exe executable is the OpenLDAP server. Double click on this file or launch it from a command line. Do not expect any message, but leave the command window open for the next steps. If you want debug information, use the -d switch:

slapd -d 1Server test

The OpenLDAP command line tools can be used to test the server. The following command executes a search query on the server:

ldapsearch -x -s base (objectclass=*) namingContextsType this command in a cmd window positioned in the OpenLDAP installation directory. For more information on search syntax, try ldapsearch -? .

In order to ease server administration, you can switch to a graphical LDAP client, such as the LDAP Browser/Editor developed by Jarek Gawor, available at: http://www.iit.edu/~gawojar/ldap

Start the client and provide connection information:

 

The connection must succeed, but an error message is displayed in the status bar: List Failed . This error is expected as there is no entry in the database, double click on the message to get more details.

Build directory content

In order to insert the first entries in the database, create an init.ldif file and add the following content (according to the configuration specified in slapd.conf):

dn: dc=guessant,dc=org
objectclass: top
objectclass: dcObject
objectclass: organization
o: Guessant
dc: guessant

dn: cn=Manager,dc=guessant,dc=org
objectclass: organizationalRole
cn: ManagerCreate this file directly in OpenLDAP installation directory or anywhere after adding the installation directory to the system PATH.

Load entries in directory (adjust slapd.conf and init.ldif files path as needed):

slapadd -f slapd.conf -l init.ldifThe slapadd command bypasses the LDAP server and applies changes directly to the BDB database. Restart the server to flush its cache.

Try a new connection with Ldap Browser to check the new entries. A named (i.e. not Anonymous) connection is necessary to add or change entries: uncheck Anonymous Bind and provide User Info.

According to example configuration, User DN is cn=Manager , check append base DN and use password secret .

 

Install as an NT service

In order to have the server always available, register OpenLDAP as a Windows service. If the option was not checked at installation time, use the following command:

slapd installAnd to remove the service:

slapd removeOpenLDAP daemon parameters can be modified by creating registry keys. Create a .reg file with the following content en register keys by double clicking on it:

REGEDIT4

[HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\OpenLDAP-slapd\Parameters]
"DebugLevel"=dword:00000000
"ConfigFile"=".\\slapd.conf"
"Urls"="ldap:///"See README.txt file included in the distribution for more information on registry keys search algorithm.

DebugLevel is used to change trace level, ConfigFile is the configuration file path and Urls matches the syntax of the -h command line option.

For example, set Urls to ldap://localhost:port/ to set a different listen port.

 

本文来自优快云博客,转载请标明出处:http://blog.youkuaiyun.com/gzaqq/archive/2007/06/20/1659717.aspx

安装和配置LDAP服务器及连接测试(Windows系统) 在Windows系统中,您可以安装和配置LDAP服务器,并进行连接测试。本文将提供详细的步骤和相应的源代码示例来帮助您完成这些操作。您可以从OpenLDAP官方网站(http://www.openldap.org/)下载最新的Windows版本。这就是在Windows系统下安装和配置LDAP服务器以及进行连接测试的详细步骤。安装完成后,您需要进行LDAP服务器的配置。步骤2:导航到OpenLDAP安装目录,例如:C:\OpenLDAP。步骤3:创建一个新的LDAP配置文件,例如:slapd.conf。 阅读详情

相关推荐

Windows_7_下搭建LDAP服务器并使用JNDI

The Lightweight Directory Access Protocol , or LDAP ,is an application protocol for querying and modifying directory services running over TCP/IP .(via wikipedia )。LDAP全称是一个轻量级的目录访问协议,它是建立在TCP/IP基础之上的用来查询和修改目录服务的。这是照着wiki翻译的,但是有人要问了什么是directory Service(目录服务)? 按照wiki的说法的话讲:在软件行业,目录就如同一个字典,他使得通过某一名称去查找绑定在该名称上的值得方式成为一种可能。有点类似Java中Map的概念。a directory service is simply the software system that stores, organizes and provides access to information in a directory. 一个目录服务就是一个简单的软件系统,在这个目录上提供了存取和组织信息的功能。LDAP目录中可以存储各种类型的数据:电子邮件地址、邮件路由信息、人力资源数据、公用密匙、联系人列表,等等。 OK,进入正题。Google搜索 windows ldap服务器 ,终于找到了一个比较好的流行的:OpenLDAP(点击下载) 。

Windows下LDAP服务安装与使用

https://blog.youkuaiyun.com/wrwhahah/article/details/83034126 ldapadd -x -D "cn=Manager,dc=maxcrc,dc=com" -w secret -f ./my.ldif ldapsearch -x -b "dc=maxcrc,dc=com" "(objectclass=*)"

oscar999的专栏 3万+

WINDOWS下搭建LDAP服务器.

LDAP(Lightweight Directory Access Protocol, 轻量级目录访问协议),是一个用于访问目录数据 (特指 X.500 目录模型,笔者并不了解此协议) 的轻量级协议。本文介绍架设 ldap 服务器的一些知识。

Windows Server 2012 R2 系统配置与管理(初级全套)

全套视频共分为15章,211课时,从初级讲起,做到全方位技术提高,内容包括系统概述、安装与基本环境设置,本地用户与组账户的管理,建立Active Directory域,NTFS磁盘的安全性与管理,访问网络文件,分布式文件系统(DFS),利用配置文件来管理用户环境,组策略与安全设置,注册表与注册表编辑器,远程桌面连接,磁盘系统的管理,防火墙技术,系统疑难故障的排除等。

SAP开发实战:用FI_DOCUMENT_CHANGE BAPI批量修改FB03凭证抬头和行项目文本(附完整ABAP代码)

本文详细介绍了如何使用SAP的FI_DOCUMENT_CHANGE BAPI批量修改FB03凭证抬头和行项目文本,提供完整的ABAP代码实现方案。通过该BAPI,开发者可以高效完成财务凭证的批量修改,确保数据一致性和审计合规性,显著提升SAP财务模块的运维效率。

weixin_29224589的博客 381

uni-app蓝牙MTU设置失效探因:从20字节限制到跨设备兼容性实战

本文深入探讨了uni-app蓝牙开发中MTU设置失效的常见问题,特别是20字节限制的成因及解决方案。通过分析设备兼容性、蓝牙协议栈特性和系统版本差异,提供了智能延迟策略、设备特征检测和渐进式MTU提升等实战方案,帮助开发者优化蓝牙数据传输效率。

weixin_29289821的博客 289

文件服务器 ldap,windows下搭建ldap服务器

windows下搭建ldap服务器 内容精选换一换当您发现云服务器的运行速度变慢或云服务器突然出现网络断开的情况,则可能是云服务器的带宽和CPU利用率过高导致。如果您已经通过云监控服务创建过告警任务,当CPU或带宽利用率高时,系统会自动发送告警给您。Windows云服务器带宽流量过高或CPU利用率高,您可以按如下步骤进行排查:问题定位:定位影响云服务器带宽和CPU利用率高的进程。Wind本文以云服...

weixin_35829704的博客 1695

别再为EPI形变头疼了!FSL的topup+eddy实战保姆级教程(含AP/PA数据采集要点)

本文详细介绍了如何使用FSL的topup和eddy工具解决EPI形变问题,包括数据采集要点、参数设置和实战操作步骤。通过AP/PA双编码数据和精确的形变场估计,有效矫正MRI图像中的几何畸变,提升弥散数据质量。特别适合需要处理高场强MRI数据的研究人员和技术人员。

weixin_28725949的博客 401

Windows ❀ AD域服务器的搭建(LDAP协议)

Windows下AD域服务器是如何搭建的? 一、AD域介绍 1、目录服务 定义:目录服务就是按照树状存储信息的模式 目录服务特点: 目录服务的数据类型主要是字符型,而不是关系数据库提供的整数、浮点数、日期、货币等类型; 为了检索的需要添加了BIN(二进制数据)、CIS(忽略大小写)、CES(大小写敏感)、TEL(电话型)等语法(Syntax)同样也不提供相关系数据库中普遍包含的大量的函数; 目录...

无糖可乐没有灵魂 1万+

同步辐射材料科学应用指南:从XAFS原位实验到数据处理

材料结构分析是材料研究的核心环节,但传统实验室X射线受限于能量固定、亮度不足,往往难以回答原子局域配位、非晶结构及动态演变等关键问题。同步辐射光源以高通量、连续可调、偏振可控及脉冲时间结构等特性,将材料表征从静态观察推进到原位动态追踪层次。基于X射线吸收精细结构谱(XAFS)、原位实验、X射线衍射与散射、微区成像等技术,研究人员可实现元素选择性分析、近邻原子环境解析及真实工况下的结构演变监测。本文从技术原理出发,覆盖实验方案设计、样品制备、现场对光、数据处理与常见故障排查,并结合典型应用场景,为材料科学领域

weixin_32612263的博客 166

Halcon实战:5分钟搞定金属表面划痕检测(附完整代码解析)

本文提供了一份基于Halcon的金属表面划痕检测实战指南。通过核心的动态阈值算法,快速从图像中提取局部对比度异常区域,并结合形态学后处理与特征筛选,精准识别划痕。文章详解了从代码搭建、参数优化到工业场景适配的全流程,帮助工程师在五分钟内构建稳定高效的机器视觉检测方案。

weixin_29084231的博客 496

Windows 下搭建LDAP服务器

The Lightweight Directory Access Protocol , or LDAP ,is an application protocol for querying and modifying directory services running over TCP/IP .(viawikipedia)。LDAP 全称是一个轻量级的目录访问协议,它是建立在TCP/IP

Wayne in Oracle 7456

【网络安全 | 渗透工具】密码字典生成工具crunch、cupp安装使用教程

Crunch是一个常用的密码破解工具,它可以根据指定的字符集、长度和模式生成各种可能的密码并进行暴力破解。同时,Crunch可以将生成的密码保存到文件中,以便在破解工具中使用。在进行渗透测试时,手动收集密码字典是十分耗时的,利用密码字典生成工具可以大幅缩短时间,提高爆破宽度。

等风来 8424

windows下搭建ldap服务器

LDAP服务器:http://download.bergmans.us/openldap/openldap-2.2.29/openldap-2.2.29-db-4.3.29-openssl-0.9.8a-win32_Setup.exe 还要修改一个地方:在slapd.conf中把include ./schema/core.schema改成: include ...

iteye_16403的博客 394

File Load Error for Untitled.ipynb Unhandled error 解决方案

本文主要介绍了File Load Error for Untitled.ipynb Unhandled error 解决方案,希望能对使用jupyter notebook的同学们有所帮助。 文章目录 1. 问题描述 2. 解决方案

weixin_43178406的博客 1万+

25、量子计算:中性原子与约瑟夫森结量子比特

本文详细探讨了中性原子和约瑟夫森结两种量子比特在量子计算中的应用。中性原子量子比特利用光晶格实现量子态的操控,具有长相干时间的优势,但面临可扩展性和多量子比特操作的挑战;而约瑟夫森结量子比特基于超导技术,结合半导体制造工艺,具有低耗散和潜在的高可扩展性,但在参数控制和环境干扰方面存在难题。文章还比较了这两种方案的性能、应用场景及未来发展趋势,展望了它们在量子计算发展中的潜力与突破方向。

ol789012的博客 212
上一篇: JNDI 连接Windows Active Directory 教程
下一篇: windows下openldap的安装与java操作测试
topinking
博客等级 码龄20年 15粉丝 242原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值