`

WINDOWS下搭建LDAP服务器

阅读更多

http://blog.csdn.net/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.

 

本文来自CSDN博客,转载请标明出处:http://blog.csdn.net/gzaqq/archive/2007/06/20/1659717.aspx

分享到:
评论

相关推荐

    WINDOWS下搭建LDAP服务器.

    在Windows环境下搭建LDAP服务器,一般会使用微软的Active Directory服务,它是Windows Server操作系统的核心组件,提供了包括身份验证、授权和目录服务在内的多种功能。要安装AD,你需要在Windows Server上运行安装...

    windows下的ldap服务器

    开放的windows下的LDAP(轻量级的目录处理)服务器,性能很好哦。

    Windows 7 下搭建LDAP服务器并使用JNDI

    根据提供的信息,我们可以详细探讨如何在Windows 7环境下搭建LDAP服务器并使用JNDI进行访问。以下是关于这一过程的关键知识点: ### LDAP基础知识 **LDAP**(Lightweight Directory Access Protocol,轻量目录访问...

    windows下搭建并配置OpenLDAP服务器

    在《Windows 7下搭建LDAP服务器并使用JNDI.doc》文档中,应该提供了更具体的步骤和示例代码,你可以参考这份文档进行实际操作。记住,搭建和配置OpenLDAP是一个细致的过程,需要对LDAP协议和相关工具有一定的理解。

    ldap安装与客户端ldapadmin windows

    为了在Windows上搭建LDAP服务器,我们可以选择OpenLDAP,它是一个开源的实现。从可靠的源下载`OpenLDAPforWindows_x64.exe`,确保选择与您的系统架构相匹配的版本。 #### 1.2 安装OpenLDAP 运行`OpenLDAPforWindows...

    LDAP搭建资料

    Windows下搭建LDAP** - **安装Active Directory**:Windows操作系统内置了AD(活动目录),它基于LDAP实现,可以作为搭建的基础。 - **配置DNS**:确保DNS服务配置正确,以便于域名解析和目录服务查找。 - **创建域...

    windows 下ldap admin 连域工具

    本文将围绕“Windows下LDAP Admin连域工具”这一主题,详细探讨如何使用LDAP(轻量目录访问协议)连接到域,以及如何在Windows Server上搭建域服务器和导出证书。 首先,LDAP是一种应用广泛的目录服务协议,用于...

    windows下搭建Radius服务器的好工具

    在Windows操作系统下,搭建Radius服务器可以帮助企业或个人有效地管理网络访问权限,确保网络安全。本文将详细介绍如何使用WinRadius这一工具在Windows环境下快速构建和配置Radius服务器。 WinRadius是一款专为...

    Win7 XP LDAP服务器 客户端软件

    标题中的“Win7 XP ...总的来说,这个压缩包提供了在Windows 7和Windows XP环境下搭建和管理LDAP服务器以及进行相关操作的全套解决方案。用户需要了解如何配置和使用这些工具,以便有效地利用LDAP来管理和共享信息。

    LDAP服务器搭建--20200703.docx

    **LDAP服务器搭建详解** LDAP(Lightweight Directory Access Protocol)是一种轻量级目录访问协议,用于存储和检索组织数据,如用户账号、权限信息等。它常用于构建企业级的身份认证和授权系统。本文将手把手教你...

    linux上搭建radius服务器

    在搭建 RADIUS 服务器时,管理员需要安装 RADIUS 服务器,配置 RADIUS 服务器以便基于 LDAP 验证用户,设置用户信息在 LDAP 服务器上,并配置 NAS 以便与 RADIUS 服务器通信。 通过搭建 RADIUS 服务器,管理员可以...

    搭建FTP服务器,使用Ldap中的账户

    本指南告诉你在Debian Lenny上怎样将pure-ftpd集成到iRedMail的ldap后端。密码将存储在ldap中并且你可以通过webmail来改变它们。

    windows 下安装和使用OpenLDAP。

    Windows 下安装和使用 OpenLDAP OpenLDAP 是一个开源的 LDAP 服务器实现,它提供了一个轻量级的目录访问协议,基于 X.500 标准,但比 X.500 简洁许多。OpenLDAP 支持 TCP/IP,适合Internet 环境。目录是一个专业的...

    最简单的LDAPS服务器搭建方法--ApacheDS 安装以及LDAPS配置

    构建 LDAPS 服务器是大数据集群搭建过程中的一个关键步骤。 LDAPS(Lightweight Directory Access Protocol over SSL/TLS)是一种基于 X.509 证书的身份验证机制,提供了安全的身份验证和加密通信功能。在本文中,...

    建立LDAP服务器

    #### 使用Domino搭建LDAP服务器: **Domino**是由IBM开发的一款集成了邮件、日程安排、文档管理和Web应用等功能的企业级协作平台。通过Domino,企业可以构建强大的内部通信和协作环境,同时,Domino也支持LDAP服务...

    windows2012域控LDAPLDAPSSSLTLS.pdf

    在本文档中,我们主要探讨了如何在Windows Server 2012环境下搭建域控制器(DC),并启用轻量级目录访问协议(LDAP)以及安全套接层(SSL)和传输层安全(TLS)来增强AD连接的安全性。以下是详细步骤和相关知识点: ...

    ldap 详解(linux 下的ldap配置精华文档)

    在 Linux 中,可以使用 OpenLDAP 软件来实现 LDAP 服务器的搭建和配置。OpenLDAP 是一个开源的 LDAP 服务器软件,支持多种后端数据库,包括 BDB、LDAB 和 MySQL 等。 LDAP 是一种集中化的管理方式,旨在解决局域网...

Global site tag (gtag.js) - Google Analytics