Windows搭建Ldap服务器

xiaoxiao2021-02-28  121

目录

目录 Rerference Sofeware 中下载即可安装配置文件常用命令客户端使用LDIF文件


Rerference Sofeware (中下载即可)

LdapServer安装包 openldap-2.2.29-db-4.3.29-openssl-0.9.8a-win32_Setup.exeLdap客户端 LdapBrowserLdapAdmin.exe

安装

一路next到install即可。

配置文件

1 slapd.conf 2 找到 include ./schema/core.schema,换行后添加 include ./schema/cosine.schema include ./schema/inetorgperson.schema 3 database类型改为ldbm 4 域名 suffix "dc=crm,dc=com" 5 默认管理员 rootdn "cn=Manager,dc=crm,dc=com" 6 管理员密码 rootpw 111 ps:注意每行顶行写,key、value间用空格隔开。

常用命令

启动服务 slapd -d 1

客户端使用

1 新建链接 Host:主机IP Port:默认389 Base:配置域名 UserName:默认管理员用户 Password:管理员密码 2 数据初始化(使用LdapBrowser,执行lbe.bat文件即可启动) 导入init.ldif即可 ps:必须初始化才可以进行后续的操作,直接新建ldif文件会因为编码问题导致不能成功导入,所以最好在原有的文件基础上修改。 3 添加用户操作(使用LdapAdmin.exe) 1 右键目录->new->entry 2 objectclass选择top、uidObject、inetOrgPerson 3 Attribute中uid(用户id)、sn、cn、givenName(用户名) 4 Rdn取uid

LDIF文件

1 注意每行顶行写 2 key、value间用空格隔开 3 一个dn为一个entry,每个entry用空行隔开 4 执行./docs/back-meta/data/setup.sh文件可以生成ldif 5 demo dn: dc=crm,dc=com objectClass: dcObject objectClass: organization o: info.net dn: ou=Developer, dc=crm,dc=com objectClass: top objectClass: organizationalUnit ou: Developer description: Developer Users dn: cn=Manager, dc=crm,dc=com objectClass: top objectClass: person objectClass: organizationalPerson cn: Manager sn: Manager userPassword: Manager description: Manager Users
转载请注明原文地址: https://www.6miu.com/read-25013.html

最新回复(0)