Page tree

Welcome to FreeSoftwareServers Confluence Wiki

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Next »

Note: Copy and custom templates from /etc/phpldapadmin/templates/{creation,modification}

Old Server:


sudo su
mkdir ~/ldapbackup
cd /etc/ldap && tar zcvf etcldap.tgz * -R
slapcat > ldap_export_file.ldif
cp etcldap.tgz ~/ldapbackup
cp ldap_export_file.ldif ~/ldapbackup
cd ~
tar zcvf ldapbackup.tgz ldapbackup
scp ldapbackup.tgz user@newserer:/tmp/ 

New Server:

sudo su 
apt-get install -y apache2 slapd ldap-utils phpldapadmin 

Note: DO NOT DPKG-RECONFIGURE or add LDIF's till after your re-imported old stuff!! This took me awhile to figure out, I was adding openssh-ldap.ldif and getting errors about duplicate entries when importing old data. Just install the program and import data, THEN configure/check.

service slapd stop
rm /etc/ldap/* -R
mkdir ~/ldapbackup
mv /tmp/ldapbackup.tgz ~/ldapbackup
cd ~/ldapbackup
tar zxvf ldapbackup.tgz
cp etcldap.tgz /etc/ldap/
cd /etc/ldap
tar zxvf etcldap.tgz 
service slapd start 

If not Check perms and tail -f /var/log/syslog

chown openldap:openldap /etc/ldap/slapd.d/ -R 



service slapd stop 
cd ~/ldapbackup
rm /var/lib/ldap/* -R
touch /var/lib/ldap/accesslog
slapadd -l ldap_export_file.ldif 
service slapd start


If not Check perms and

tail -f /var/log/syslog 
chown openldap:openldap /var/lib/ldap -R

  • No labels