The following assumptions must be true before you start the configuration of the OpenLDAP server:
The subsequent use of secldap is an example container name; customize this as required.
Perform the following steps to configure your OpenLDAP server:
tar czf /etc/openldap/slapd-backup.tgz slapd.conf -C /var/lib ldap
To stop and clear slapd, execute the following on the command line:
systemctl stop slapd systemctl disable slapd rm -rf /etc/openldap/slapd.d rm -f /var/lib/ldap/* yum -y remove openldap-servers yum -y remove openldap-clients
yum -y install openldap-servers
yum -y install openldap-clients
sed -i '/CRC.*/d' /etc/openldap/slapd.d/cn=config/olcDatabase={0}config.ldif
 
sed -i '/olcAccess:.*/c\olcAccess: {0}to * by dn.exact=gidNumber=0+uidNumber=0,cn=peercred,cn=external,cn=auth manage by * break' /etc/openldap/slapd.d/cn=config/olcDatabase={0}config.ldif
 
sed -i '/ al,cn=auth.*/d' /etc/openldap/slapd.d/cn=config/olcDatabase={0}config.ldif 
                  		systemctl start slapd
dn: olcDatabase={0}config,cn=config
changetype: modify
add: olcRootPW
olcRootPW: {SSHA}xxxxxxxxxxxxxxxxxxxxxxxx 
                  		secret=$(slappasswd -s [password]) sed -i "/olcRootPW:.*/c\olcRootPW: $secret" chrootpwd.ldif
ldapadd -Y EXTERNAL -H ldapi:/// -f chrootpwd.ldif ldapadd -Y EXTERNAL -H ldapi:/// -f /etc/openldap/schema/core.ldif ldapadd -Y EXTERNAL -H ldapi:/// -f /etc/openldap/schema/corba.ldif ldapadd -Y EXTERNAL -H ldapi:/// -f /etc/openldap/schema/cosine.ldif ldapadd -Y EXTERNAL -H ldapi:/// -f /etc/openldap/schema/duaconf.ldif ldapadd -Y EXTERNAL -H ldapi:/// -f /etc/openldap/schema/dyngroup.ldif ldapadd -Y EXTERNAL -H ldapi:/// -f /etc/openldap/schema/inetorgperson.ldif ldapadd -Y EXTERNAL -H ldapi:/// -f /etc/openldap/schema/java.ldif ldapadd -Y EXTERNAL -H ldapi:/// -f /etc/openldap/schema/misc.ldif ldapadd -Y EXTERNAL -H ldapi:/// -f /etc/openldap/schema/nis.ldif ldapadd -Y EXTERNAL -H ldapi:/// -f /etc/openldap/schema/openldap.ldif ldapadd -Y EXTERNAL -H ldapi:/// -f /etc/openldap/schema/collective.ldif ldapadd -Y EXTERNAL -H ldapi:/// -f /etc/openldap/schema/ppolicy.ldif
dn: cn=module,cn=config
objectClass: olcModuleList
cn: module
olcModulepath: /usr/lib/openldap
olcModuleload: back_hdb
 
dn: olcDatabase=hdb,cn=config
objectClass: olcDatabaseConfig
objectClass: olcHdbConfig
olcDatabase: {1}hdb
olcDbDirectory: /var/lib/ldap
olcDbIndex: objectClass eq,pres
olcDbIndex: ou,cn,mail,surname,givenname eq,pres,sub
olcSuffix: dc=secldap,dc=com
olcRootDN: cn=Manager,dc=secldap,dc=com
olcRootPW: {SSHA}xxxxxxxxxxxxxxxxxxxxxxxx
olcAccess: {0}to attrs=userPassword,shadowLastChange by dn="cn=Manager,dc=secldap,dc=com" write by anonymous auth by self write by * none
olcAccess: {1}to dn.base="" by * read
olcAccess: {2}to * by dn="cn=Manager,dc=secldap,dc=com" write by * read 
                  		secret=$(slappasswd -s [connection password]) sed -i "/olcRootPW:.*/c\olcRootPW: $secret" backend.ldif ldapadd -Y EXTERNAL -H ldapi:/// -f backend.ldif
systemctl stop slapd
include corba.schema include core.schema include cosine.schema include duaconf.schema include dyngroup.schema include inetorgperson.schema include java.schema include misc.schema include nis.schema include openldap.schema include ppolicy.schema include collective.schema include container.schema include mfds.schema
cp -r /etc/openldap/schema .
 
mfds -l "dc=secldap,dc=com" 2 schema/mfds.schema
 
rm -rf schema/cn=config
 
cd schema
 
slaptest -f ../schema_convert.conf -F .
 
cd ..
 
cp schema/cn=config/cn=schema/cn={12}container.ldif /etc/openldap/slapd.d/cn=config/cn=schema
 
cp schema/cn=config/cn=schema/cn={13}mfds.ldif /etc/openldap/slapd.d/cn=config/cn=schema
 
chown -R ldap /etc/openldap/slapd.d
 
chmod -R 700 /etc/openldap/slapd.d 
                  		systemctl start slapd
systemctl enable slapd
rm -rf schema/log mkdir schema/log
dn: dc=secldap,dc=com objectClass: dcObject objectClass: organization dc: secldap description: secldap domain o: MFSECLDAP
dn: cn=Micro Focus,dc=secldap,dc=com cn: Micro Focus objectClass: container dn: cn=Enterprise Server Resources,cn=Micro Focus,dc=secldap,dc=com cn: Enterprise Server Resources objectClass: container dn: cn=Enterprise Server Users,cn=Micro Focus,dc=secldap,dc=com cn: Enterprise Server Users objectClass: container dn: cn=Enterprise Server User Groups,cn=Micro Focus,dc=secldap,dc=com cn: Enterprise Server User Groups objectClass: container
ldapadd -v -D "cn=Manager,dc=secldap,dc=com" -w [connection_password] -f schema/top.ldif -h localhost:389 > schema/log/top.log
 
ldapadd -v -D "cn=Manager,dc=secldap,dc=com" -w [connection_password] -f schema/mf-containers.ldif -h localhost:389 > schema/log/containers.log
 
rm -f schema/mfds-users.ldif
 
mfds -e "cn=Micro Focus,dc=secldap,dc=com" "cn=Enterprise Server Users" "cn=Enterprise Server User Groups" "cn=Enterprise Server Resources" 2 "schema/mfds-users.ldif" 
 
ldapadd -v -D "cn=Manager,dc=secldap,dc=com" -w [connection_password] -f schema/mfds-users.ldif -h localhost:389 -c > schema/log/mfds-users.log
 
sed 's/DC=X/CN=Micro Focus,dc=secldap,dc=com/' /opt/microfocus/EnterpriseDeveloper/etc/es_default_ldap_openldap.ldf > schema/es_default_ldap_openldap.ldif
 
ldapadd -v -D "cn=Manager,dc=secldap,dc=com" -w [connection_password] -f schema/es_default_ldap_openldap.ldif -h localhost:389 -c > schema/log/es_default_ldap_openldap.log 
                  		ldapsearch -h localhost:389 -x -b "cn=subschema" -s base + > schema.txtCheck the contents of the resulting file, schema.txt, to verify that there are attributes and objectClass entries that begin with microfocus-. You can also attempt to connect to the "dc=secldap,dc=com" or your customized variation, Base DN using an LDAP browser or other LDAP access tool via port 389 using the "cn=Manager,dc=secldap,dc=com" simple id and [connection password] password and browse the "cn=Micro Focus" container tree.