#slapcat -f slapd.conf -F /tmp/ldap -n 0 - This will create cn=config format in /tmp/ldap using the slapd.conf file from openldap 2.3
#rm -rf /etc/openldap/slapd.d/* - remove the current files in /etc/openldap/slapd.d
# cp -rp /tmp/ldap/cn\=config* /etc/openldap/slapd.d/ - copy the cn=config created above to /etc/openldap/slapd.d
# chown -R ldap: /etc/openldap/slapd.d - change ownership to ldap:ldap
#slaptest -uF /etc/openldap/slapd.d - successful
#/etc/init.d/slapd start
In the logs in gave an error
Mar 18 11:49:45 vm-nix-t01 slapd[2049]: null_callback : error code 0x50
Mar 18 11:49:45 vm-nix-t01 slapd[2049]: syncrepl_entry: rid=003 be_add cn=Dial_IP,ou=Group,ou=auth,dc=kinect,dc=co,dc=nz failed (80)
Mar 18 11:49:45 vm-nix-t01 slapd[2049]: do_syncrepl: rid=003 rc 80 retrying
Mar 18 11:49:50 vm-nix-t01 slapd[2049]: bdb(dc=kinect,dc=co,dc=nz): Lock table is out of available lock entries
Mar 18 11:49:50 vm-nix-t01 slapd[2049]: => bdb_idl_insert_key: c_put id failed: Cannot allocate memory (12)
Mar 18 11:49:50 vm-nix-t01 slapd[2049]: null_callback : error code 0x50
Mar 18 11:49:50 vm-nix-t01 slapd[2049]: syncrepl_entry: rid=003 be_add cn=Dial_IP,ou=Group,ou=auth,dc=kinect,dc=co,dc=nz failed (80)
Mar 18 11:49:50 vm-nix-t01 slapd[2049]: do_syncrepl: rid=003 rc 80 retrying
Mar 18 11:49:55 vm-nix-t01 slapd[2049]: bdb(dc=kinect,dc=co,dc=nz): Lock table is out of available lock entries
Mar 18 11:49:55 vm-nix-t01 slapd[2049]: => bdb_idl_insert_key: c_put id failed: Cannot allocate memory (12)
Mar 18 11:49:55 vm-nix-t01 slapd[2049]: null_callback : error code 0x50
Mar 18 11:49:55 vm-nix-t01 slapd[2049]: syncrepl_entry: rid=003 be_add cn=Dial_IP,ou=Group,ou=auth,dc=kinect,dc=co,dc=nz failed (80)
Mar 18 11:49:55 vm-nix-t01 slapd[2049]: do_syncrepl: rid=003 rc 80 retrying
But since I increase the value of the DB_CONFIG, it took out that above and only log stop and start openldap
Mar 18 15:02:22 vm-nix-t01 slapd[3178]: slapd stopped.
Mar 18 15:04:18 vm-nix-t01 slapd[1478]: @(#) $OpenLDAP: slapd 2.4.23 (Oct 31 2012 08:14:14) $#012#011mockbuild@x86-022.build.eng.bos.redhat.com:/builddir/build/BUILD/openldap-2.4.23/openldap-2.4.23/build-servers/servers/slapd
Mar 18 15:04:20 vm-nix-t01 slapd[1479]: bdb_monitor_db_open: monitoring disabled; configure monitor database to enable
Mar 18 15:04:20 vm-nix-t01 slapd[1479]: slapd starting
slapd.conf of the PROVIDER
# cat /etc/openldap/slapd.conf
..............
include /etc/openldap/schema/core.schema
include /etc/openldap/schema/cosine.schema
include /etc/openldap/schema/inetorgperson.schema
include /etc/openldap/schema/nis.schema
include /etc/openldap/schema/freeradius.schema
# Logging
loglevel none
# Allow LDAPv2 client connections. This is NOT the default.
allow bind_v2
pidfile /var/run/openldap/slapd.pid
argsfile /var/run/openldap/slapd.args
TLSCACertificateFile /etc/openldap/cacerts/cacert.pem
TLSCertificateFile /etc/openldap/tls/testaaa-int.dcnztest.co.nz.crt
TLSCertificateKeyFile /etc/openldap/tls/testaaa-int.dcnztest.co.nz.key
#######################################################################
# security policies
#######################################################################
# prevent anonymous lookups of hashed passwords
access to attrs=userPassword
by dn.exact="cn=sync,dc=kinect,dc=co,dc=nz" read
by dn.exact="uid=client-root,ou=auth,dc=kinect,dc=co,dc=nz" write
by self write
by anonymous auth
by * none
# default allow all
access to *
by self write
by users read
by anonymous read
# if no access controls are present, the default policy
# allows anyone and everyone to read anything but restricts
#######################################################################
# ldbm and/or bdb database definitions
#######################################################################
database bdb
suffix "dc=kinect,dc=co,dc=nz"
rootdn "cn=Manager,dc=kinect,dc=co,dc=nz"
#threads 64
# Allow unlimited length DB queries - important for ensuring reliable sync
sizelimit unlimited
rootpw {SSHA}vO/5mpk4CMOKDelv36BpjksRaHFjgqh1
password-hash {CRYPT}
password-crypt-salt-format "%s"
directory /var/lib/ldap
checkpoint 128 15
# Indices to maintain for this database
index entryUUID eq
index entryCSN eq
index objectClass eq,pres
index ou,cn,mail,surname,givenname eq,pres,sub
index uidNumber,gidNumber,loginShell eq,pres
index uid,memberUid eq,pres,sub
index nisMapName,nisMapEntry eq,pres,sub
overlay syncprov
syncprov-checkpoint 100 10
syncproc-sessionlog 100
On the consumer openldap 2.4, there is no slapd.conf file, but here is the cn\=config.ldif. This is another question that I am trying to understand, the manual is talking about slapd.conf in 2.4, but it doesn't exist by default
[root@vm-nix-t01 ~]# cat /etc/openldap/slapd.d/cn\=config.ldif
dn: cn=config
objectClass: olcGlobal
cn: config
olcConfigFile: ../slapd.conf
olcConfigDir: /tmp/ldap
olcAllows: bind_v2
olcArgsFile: /var/run/openldap/slapd.args
olcAttributeOptions: lang-
olcAuthzPolicy: none
olcConcurrency: 0
olcConnMaxPending: 100
olcConnMaxPendingAuth: 1000
olcGentleHUP: FALSE
olcIdleTimeout: 0
olcIndexSubstrIfMaxLen: 4
olcIndexSubstrIfMinLen: 2
olcIndexSubstrAnyLen: 4
olcIndexSubstrAnyStep: 2
olcIndexIntLen: 4
olcLocalSSF: 71
olcPasswordCryptSaltFormat: %s
olcPidFile: /var/run/openldap/slapd.pid
olcReadOnly: FALSE
olcReverseLookup: FALSE
olcSaslSecProps: noplain,noanonymous
olcSockbufMaxIncoming: 262143
olcSockbufMaxIncomingAuth: 16777215
olcThreads: 16
olcTLSCACertificateFile: /etc/openldap/tls/test02aaa.pem
olcTLSCertificateFile: /etc/openldap/tls/test02aaa.pem
olcTLSCertificateKeyFile: /etc/openldap/tls/test02aaa-key.pem
olcTLSVerifyClient: never
olcToolThreads: 1
olcWriteTimeout: 0
structuralObjectClass: olcGlobal
entryUUID: 7f528bf2-4271-1033-8d3c-451e105bb7d9
creatorsName: cn=config
createTimestamp: 20140317224452Z
entryCSN: 20140317224452.209642Z#000000#000#000000
modifiersName: cn=config
modifyTimestamp: 20140317224452Z