[CentOS] LDAP setup on Centos 7

Fri Nov 27 15:05:12 UTC 2015
Gary Stainburn <gary at ringways.co.uk>

I am trying to get LDAP working on my mail server for both user authentication 
and addressbook purposes.

I have tried the tutorials on both 




(The second one is for Ubuntu, but claimed to be a complete and working demo)

However, when I try to last part of each of these tutorials I get the 

ldapadd -x -D cn=admin,dc=ringways,dc=com -W -f /tmp/dit.ldif
Enter LDAP Password: 
ldap_bind: Invalid credentials (49)

Note: in the server-world one I tried using "dc=ringways,dc=com" as well as 
leaving it as "dc=server,dc=world"  but it didn't seem to make any 

After each attempt I reset  everything using the following script.

[root at ollie2 ~]# cat reset_ldap.sh 
#!/bin/bash -x

systemctl stop slapd
rpm -e openldap-servers openldap-clients
cd /var/lib
rm -Rf ldap
cd /etc/openldap/
rm -Rf slapd.d/
yum -y install openldap-servers openldap-clients
cp /usr/share/openldap-servers/DB_CONFIG.example /var/lib/ldap/DB_CONFIG 
systemctl start slapd
slaptest -F /etc/openldap/slapd.d
[root at ollie2 ~]# 

Do I need to do anything else, as it would appear that there is something I'm