WINDOWS下搭建LDAP服务器

简介: http://wiki.zimbra.com/wiki/UNIX_and_Windows_Accounts_in_Zimbra_LDAP_and_Zimbra_Admin_UI 原文地址: http://mguessan.

http://wiki.zimbra.com/wiki/UNIX_and_Windows_Accounts_in_Zimbra_LDAP_and_Zimbra_Admin_UI

 

原文地址: 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

目录
相关文章
|
3天前
|
SQL 关系型数据库 MySQL
Windows服务器的最佳数据库是什么?
【7月更文挑战第20天】Windows服务器的最佳数据库是什么?
14 5
|
3天前
|
Java Linux 应用服务中间件
Windows和Linux的最佳Web服务器
【7月更文挑战第20天】Windows和Linux的最佳Web服务器
9 3
|
5天前
|
弹性计算 持续交付 Docker
阿里云云效产品使用合集之如何部署到阿里云服务器上的 Windows Server 上的 IIS
云效作为一款全面覆盖研发全生命周期管理的云端效能平台,致力于帮助企业实现高效协同、敏捷研发和持续交付。本合集收集整理了用户在使用云效过程中遇到的常见问题,问题涉及项目创建与管理、需求规划与迭代、代码托管与版本控制、自动化测试、持续集成与发布等方面。
|
12天前
|
网络协议 Unix 网络安全
FTP服务器怎么搭建?Windows server搭建FPT服务器
FTP服务器是按照FTP协议提供文件传输服务的计算机。它用于在两台计算机间安全地传输文件,支持用户权限管理和跨平台操作。FTP使用控制连接处理命令,数据连接传输文件,有PORT和PASV模式。要搭建FTP服务器,首先在Windows Server 2008 R2上安装IIS,确保选中FTP服务。接着,创建FTP文件夹作为站点根目录,通过IIS管理器添加FTP站点,配置站点信息、身份验证和权限。测试客户端通过telnet和浏览器访问FTP服务器,确认能成功登录及浏览文件。FTP常用于文件共享和管理,可通过专用工具如FlashFXP上传下载文件。
34 0
FTP服务器怎么搭建?Windows server搭建FPT服务器
|
Ubuntu Linux 数据库
阿里云服务器ECS操作系统:linux系统与windows系统的区别
阿里云服务器ECS操作系统:linux系统与windows系统的区别.首先,我们要清楚的便是每个系统之间的差别,以及在阿里云上的差别
13189 0
|
5天前
|
存储 弹性计算 大数据
阿里云服务器怎么样?云服务器ECS功能、租用费用全解析
阿里云ECS是弹性计算服务,提供安全可靠的云服务器,包括多种实例规格如经济型、通用型、计算型等,适合不同场景。ECS支持VPC专有网络、快照与镜像、多种付费模式。用户可按需选择计算架构、存储类型,享受灵活的网络控制、自动化数据备份和低成本计算资源。适用于Web应用、在线游戏、大数据分析和深度学习等场景。阿里云提供免费试用和优惠价格,服务众多知名企业,如新浪微博。
|
5天前
|
存储 弹性计算 大数据
阿里云服务器怎么样?全访问解析云服务器ECS功能、租用、优缺点及使用说明
阿里云ECS是弹性计算服务,提供安全可靠的云服务器,包括多种实例规格如经济型、通用型、计算型等,适合不同场景。ECS支持VPC专有网络、快照与镜像、多种付费模式。用户可根据业务需求选择实例、存储类型和网络配置。阿里云服务器适用于Web应用、游戏、大数据和深度学习等场景,提供免费试用和不同优惠套餐。众多知名企业如新浪微博等信赖阿里云服务。更多信息可访问阿里云官方网站。
|
5天前
|
存储 弹性计算 应用服务中间件
阿里云经济型e与通用算力型u1实例长效特价云服务器解析,性能与性价比的完美平衡
阿里云目前有两款深受个人和普通企业用户喜欢的特价云服务器,ECS 经济型e实例2核2G,3M固定带宽,40G ESSD Entry云盘,仅需99元1年。ECS u1实例2核4G,5M固定带宽,80G ESSD Entry盘,仅需199元1年。新老同享,活动期间新购、续费同价。很多用户关心这两款云服务器性能怎么样?本文将对阿里云2024年推出的特价云服务器进行深度解析,从性能、价格、适用场景等多个维度进行详细探讨,以供选择参考。
阿里云经济型e与通用算力型u1实例长效特价云服务器解析,性能与性价比的完美平衡
|
6天前
|
弹性计算 Linux 网络安全
使用阿里云服务器迁移中心SMC将其他云平台业务迁移至阿里云教程参考
现在越来越多的个人和企业用户选择将其他云平台或者服务商的业务迁移到阿里云,但是如何快速且安全完成迁移是很多用户比较关注的问题,我们可以选择使用阿里云提供的服务器迁移中心(Server Migration Center,简称SMC),这个产品是阿里云提供给您的迁移平台,专注于提供能力普惠、体验一致、效率至上的迁移服务,满足您在阿里云的迁移需求。本文为大家展示使用阿里云服务器迁移中心SMC将其他云平台业务迁移至阿里云的教程,以供参考。
使用阿里云服务器迁移中心SMC将其他云平台业务迁移至阿里云教程参考
|
1天前
|
弹性计算 开发者
阿里云2核4G云服务器租用费用,轻量和ECS实例规格整理
阿里云2核4G服务器概览: - ECS u1企业专享:2核4G,5M带宽,80G ESSD盘,199元/年,续费同价。 - 轻量应用:2核4G,4M带宽,60GB ESSD,298元/年,新人特惠。 - ECS u1实例基于Intel Xeon Platinum处理器,提供稳定算力。 - **注意:** 企业用户优先选择199元方案,个人开发者适合轻量应用服务器。
18 5

热门文章

最新文章