软件安装

# yum -y install openldap-servers openldap-clients

# systemctl start slapd

# systemctl enable slapd

密码修改

# slappasswd

New password:

Re-enter new password:

{SSHA}xxxxxxxxxxxxxxxxxxxxxxxx

# vim chrootpw.ldif

# specify the password generated above for "olcRootPW" section

dn: olcDatabase={}config,cn=config

changetype: modify

add: olcRootPW

olcRootPW: {SSHA}xxxxxxxxxxxxxxxxxxxxxxxx // copy above

# ldapadd -Y EXTERNAL -H ldapi:/// -f chrootpw.ldif

基础Schema导入

# ldapadd -Y EXTERNAL -H ldapi:/// -f /etc/openldap/schema/cosine.ldif

# ldapadd -Y EXTERNAL -H ldapi:/// -f /etc/openldap/schema/nis.ldif

# ldapadd -Y EXTERNAL -H ldapi:/// -f /etc/openldap/schema/inetorgperson.ldif

Ldap域数据生成

vim chdomain.ldif

# less chdomain.ldif
# replace to your own domain name for "dc=***,dc=***" section
dn:olcDatabase={}hdb,cn=config
changetype:modify
replace:olcSuffix
olcSuffix:dc=cnicg,dc=cn dn:olcDatabase={}hdb,cn=config
changetype:modify
replace:olcRootDN
olcRootDN:cn=Manager,dc=cnicg,dc=cn dn: olcDatabase={}monitor,cn=config
changetype:modify
replace:olcAccess
olcAccess: {}to * by dn.base="gidNumber=0+uidNumber=0,cn=peercred,cn=external,cn=auth" read by dn.base="cn=Manager,dc=cnicg,dc=cn" read by * none

# ldapmodify -Y EXTERNAL -H ldapi:/// -f chdomain.ldif

基础域数据

vim basedomain.ldif

# replace to your own domain name for "dc=***,dc=***" section

dn: dc=cnicg,dc=cn
objectClass: top
objectClass: dcObject
objectclass: organization
o: cnicg cn
dc: cnicg dn: cn=Manager,dc=cnicg,dc=cn
objectClass: organizationalRole
cn: Manager
description: Directory Manager dn: ou=People,dc=cnicg,dc=cn
objectClass: organizationalUnit
ou: People dn: ou=Group,dc=cnicg,dc=cn
objectClass: organizationalUnit
ou: Group

# ldapadd -x -D cn=Manager,dc=cnicg,dc=cn -W -f basedomain.ldif

最新文章

  1. RabbitMQ原理与相关操作(一)
  2. asp.net获取客户端浏览器及主机信息
  3. winform 进程,线程
  4. 从一个int值显示相应枚举类型的名称或者描述
  5. I Count Two Three---hdu5878(打表+二分)
  6. C#get,set
  7. PouchDB:可随时同步的开源JavaScript数据库
  8. Eclipse设置UTF-8
  9. 看京东如何把Intel RealSense技术用在物流上
  10. UVa----------1594(Ducci Sequence)
  11. JavaScript快速入门(二)——JavaScript变量
  12. hibernate学习(缓存)
  13. FIRMWARE BUG – THE BIOS HAS CORRUPTED HW-PMU RESOURCES
  14. Linux下安装微信(转)
  15. MongoDB -的连接和使用
  16. Codeforces 468C/469E 易错点
  17. chown命令详情
  18. Mongoose关于当天日期的查询
  19. 用C#实现对MSSqlServer数据库的增删改查---Server层(WaterLevelSetServer.cs、DeviceSetServer.cs)
  20. Robot Framework常用关键字介绍

热门文章

  1. 关于websocket通讯
  2. 数据库(11)-- Hash索引和BTree索引 的区别
  3. SQL Server 使用 Pivot 和 UnPivot 实现行列转换
  4. [笔记] Ubuntu 18.04源码编译安装OpenCV 4.0流程
  5. node的3大作用域
  6. FFmpeg 入门(3):播放音频
  7. 在python3下使用OpenCV 抓取摄像头图像提取蓝色
  8. 关于git pull时出现的问题及解决反思
  9. VS+Qt
  10. 分析Ubuntu18.04启动后的各种任务