[CentOS] OpenLDAP migration from Centos 5 to 6

Timothy Murphy

gayleard at eircom.net
Tue May 1 12:12:37 UTC 2012


I'm moving my home network server from a Dell server,
which has been having some mysterious problems,
to an HP MicroServer.
Everything - MySQL, OpenVPN, email (dovecot), httpd, etc - 
except for openLDAP,  which is taking more time 
than everything else put together.

I haven't found any straightforward instructions
on this anywhere.
The official RedHat document
<http://docs.redhat.com/docs/en-US/Red_Hat_Enterprise_Linux/6/html
/Deployment_Guide/ch-Directory_Servers.html>
doesn't really tell you what to do.

Basically, I've saved the data on the old server with
  slapcat > /tmp/ldif
and moved ldif to the new server .
But when I run
  slapadd -l /tmp/ldif
on the new server I get the response
--------------------------------------
[root at grover ldap]# slapadd -l /tmp/ldif
The first database does not allow slapadd; using the first available one (2)
bdb_db_open: warning - no DB_CONFIG file found in directory /var/lib/ldap: 
(2).
Expect poor performance for suffix "dc=my-domain,dc=com".
slapadd: line 1: database #2 (dc=my-domain,dc=com) not configured to hold 
"dc=www,dc=gayleard,dc=com"; no database configured for that naming context
_                       0.29% eta   none elapsed            none spd   1.1 
M/s 
Closing DB...
--------------------------------------

So I have copied /etc/openldap/slapd.conf from the old server to the new
and also copied the old DB_CONFIG to /var/lib/ldap
(these files are not used under CentOS-6, as far as I can see),
and run
--------------------------------------
[root at grover ldap]# slapadd -f /tmp/slapd.conf -l /tmp/ldif
bdb_monitor_db_open: monitoring disabled; configure monitor database to 
enable
-#################### 100.00% eta   none elapsed             26s spd   4.8 
k/s 
Closing DB...
[root at grover slapd.d]# /var/lib
[root at grover lib]# chown -R ldap.ldap ldap
[root at grover lib]# service slapd restart
--------------------------------------

Now I can access <http://www.gayleard.com/phpLDAPadmin>.
There is an icon named "Login" on the left,
but I am unable to login with any username/password I can think of,
eg root/<root-password>.
However, if I click on Anonymous in the login page,
I do seem to enter an LDAP database,
but with Base dc=my-domain,dc=com

If anyone has successfully navigated this journey
I should be very grateful to learn where I am going wrong.




-- 
Timothy Murphy  
e-mail: gayleard /at/ eircom.net
tel: +353-86-2336090, +353-1-2842366
s-mail: School of Mathematics, Trinity College Dublin





More information about the CentOS mailing list