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

目录
相关文章
|
26天前
|
Shell Windows
Windows服务器 开机自启动服务
Windows服务器 开机自启动服务
14 0
|
3天前
|
安全 Unix Linux
Windows如何远程连接服务器?服务器远程连接图文教程
服务器操作系统可以实现对计算机硬件与软件的直接控制和管理协调,任何计算机的运行离不开操作系统,服务器也一样,服务器操作系统主要分为四大流派:Windows Server、Netware、Unix和Linux。今天驰网飞飞将和你分享Windows server远程连接图文教程,希望可以帮助到你
16 4
Windows如何远程连接服务器?服务器远程连接图文教程
|
1月前
|
Linux 数据安全/隐私保护 Docker
linux和windows中安装emqx消息服务器
linux和windows中安装emqx消息服务器
27 0
|
1月前
|
存储 Windows
windows server 2019 云服务器看不见硬盘的解决方案
windows server 2019 云服务器看不见硬盘的解决方案
|
1月前
|
数据安全/隐私保护 Windows
Windows Server 各版本搭建终端服务器实现远程访问(03~19)
左下角开始➡管理工具➡管理您的服务器,点击添加或删除角色点击下一步勾选自定义,点击下一步蒂埃涅吉终端服务器,点击下一步点击确定重新登录后点击确定点击开始➡管理工具➡计算机管理,展开本地用户和组,点击组可以发现有个组关门用来远程登录右键这个组点击属性,点击添加输入要添加的用户名,点击确定添加成功后点击确定打开另一台虚拟机(前提是在同一个局域网内),按 WIN + R 输入 mstsc 后回车输入 IP 地址后点击连接输入用户名及密码后点击确定连接成功!
32 0
|
Ubuntu Linux 数据库
阿里云服务器ECS操作系统:linux系统与windows系统的区别
阿里云服务器ECS操作系统:linux系统与windows系统的区别.首先,我们要清楚的便是每个系统之间的差别,以及在阿里云上的差别
13134 0
|
29天前
|
Ubuntu JavaScript 关系型数据库
在阿里云Ubuntu 20.04服务器中搭建一个 Ghost 博客
在阿里云Ubuntu 20.04服务器上部署Ghost博客的步骤包括创建新用户、安装Nginx、MySQL和Node.js 18.x。首先,通过`adduser`命令创建非root用户,然后安装Nginx和MySQL。接着,设置Node.js环境,下载Nodesource GPG密钥并安装Node.js 18.x。之后,使用`npm`安装Ghost-CLI,创建Ghost安装目录并进行安装。配置过程中需提供博客URL、数据库连接信息等。最后,测试访问前台首页和后台管理页面。确保DNS设置正确,并根据提示完成Ghost博客的配置。
在阿里云Ubuntu 20.04服务器中搭建一个 Ghost 博客
|
1月前
|
存储 弹性计算 数据可视化
要将ECS中的文件直接传输到阿里云网盘与相册(
【2月更文挑战第31天】要将ECS中的文件直接传输到阿里云网盘与相册(
415 4
|
1月前
|
SQL 弹性计算 安全
购买阿里云活动内云服务器之后设置密码、安全组、增加带宽、挂载云盘教程
当我们通过阿里云的活动购买完云服务器之后,并不是立马就能使用了,还需要我们设置云服务器密码,配置安全组等基本操作之后才能使用,有的用户还需要购买并挂载数据盘到云服务器上,很多新手用户由于是初次使用阿里云服务器,因此并不知道这些设置的操作流程,下面给大家介绍下这些设置的具体操作流程。
购买阿里云活动内云服务器之后设置密码、安全组、增加带宽、挂载云盘教程
|
18天前
|
弹性计算
阿里云ECS使用体验
在申请高校学生免费体验阿里云ECS云服务器后的一些使用体验和感受。