Openldap下配置文件slapd.conf详解

在安装完Openldap协议后,就要开始对修改配置文件,修改成符合我们项目需要的环境变量,vi进入openldap2.3.43/etc/openldap/slapd.conf

# See slapd.conf(5) for details on configuration options.
# This file should NOT be world readable.
#以下标红的都是新增的集合,除了staff.schema是我们要去定义的,其他都默认。staff.schema类型ORACLE中的新增表,怎么定义另外说明
include   /weblogic/openldap/openldap2.3.43/etc/openldap/schema/core.schema
include   /weblogic/openldap/openldap2.3.43/etc/openldap/schema/corba.schema
include   /weblogic/openldap/openldap2.3.43/etc/openldap/schema/cosine.schema
include   /weblogic/openldap/openldap2.3.43/etc/openldap/schema/dyngroup.schema
include   /weblogic/openldap/openldap2.3.43/etc/openldap/schema/inetorgperson.schema
include   /weblogic/openldap/openldap2.3.43/etc/openldap/schema/java.schema
include   /weblogic/openldap/openldap2.3.43/etc/openldap/schema/misc.schema
include   /weblogic/openldap/openldap2.3.43/etc/openldap/schema/nis.schema
include   /weblogic/openldap/openldap2.3.43/etc/openldap/schema/openldap.schema

include   /weblogic/openldap/openldap2.3.43/etc/openldap/schema/staff.schema
# Define global ACLs to disable default read access.
# Do not enable referrals until AFTER you have a working directory
# service AND an understanding of referrals.
#referral       ldap://root.openldap.org
pidfile         /weblogic/openldap/openldap2.3.43/var/run/slapd.pid
argsfile        /weblogic/openldap/openldap2.3.43/var/run/slapd.args
# Load dynamic backend modules:
# modulepath    /home/openldap/openldap2.3.43/libexec/openldap
# moduleload    back_bdb.la
# moduleload    back_hdb.la
# moduleload    back_ldap.la
# Sample security restrictions
#       Require integrity protection (prevent hijacking)
#       Require 112-bit (3DES or better) encryption for updates
#       Require 63-bit encryption for simple bind
# security ssf=1 update_ssf=112 simple_bind=64
# Sample access control policy:
#       Root DSE: allow anyone to read it
#       Subschema (sub)entry DSE: allow anyone to read it
#       Other DSEs:
#               Allow self write access
#               Allow authenticated users read access
#               Allow anonymous users to authenticate
#       Directives needed to implement policy:
# access to dn.base="" by * read
# access to dn.base="cn=Subschema" by * read
# access to *
#       by self write
#       by users read
#       by anonymous auth
#
# if no access controls are present, the default policy
# allows anyone and everyone to read anything but restricts
# updates to rootdn.  (e.g., "access to * by * read")
#
# rootdn can always read and write EVERYTHING!
#######################################################################
# BDB database definitions
#######################################################################

#bdb表示协议对接BerkeleyDB  dc表示根目录名称wanda万达简称;cn表示根节点,默认admin;rootpw密码生成方式,网上很多
database        bdb
suffix "dc=wanda,dc=com"
rootdn "cn=admin,dc=wanda,dc=com"

# Cleartext passwords, especially for the rootdn, should
# be avoid.  See slappasswd(8) and slapd.conf(5) for details.
# Use of strong authentication encouraged.
# rootpw          eamsecret
rootpw          {SSHA}Uo2tm95UQU6DxQaEQ9gepb+8RFBVBpi8
# The database directory MUST exist prior to running slapd AND
# should only be accessible by the slapd and slap tools.
# Mode 700 recommended.
directory       /weblogic/openldap/openldap2.3.43/var/openldap-data

#新增安装目录下的日志写入文件
replogfile      /weblogic/openldap/openldap2.3.43/var/slapd.replog
#directory       /weblogic/openldap-log/var/openldap-data
#replogfile      /weblogic/openldap-log/var/slapd.replog
# Indices to maintain
index   objectClass     eq
#self index

#新增staff.schema下字段的索引,当导入数据后生成对应的索引文件,可大大提高ldap的读取效率,数量不受限制
index uuid,staffAccount eq,pres,sub
#timeout (second)
#idletimeout 600

#新增超时时间,日志、缓存等参数大小
ulimit -n 65535
loglevel  256
#cachesize
cachesize       50000
idlcachesize    150000
checkpoint      1024    5

#配置LDAP主master主服务器同步机制,credentials明文密码,slave1,slave2,master要在 hosts上配置对应的IP映射

#LDAP主slave从服务配置与主服务的更新机制,如下updatedn "cn=admin,dc=wanda,dc=com"    updateref  ldap://master:端口

#synchronization
replica uri=ldap://slave1:端口
        binddn="cn=admin,dc=wanda,dc=com"
        bindmethod=simple credentials=secret
replica uri=ldap://slave2:端口
        binddn="cn=admin,dc=wanda,dc=com"
        bindmethod=simple credentials=secret

你可能感兴趣的:(LDAP)