So I’m migrating to a new server and needed to move all my users and groups over to my new machine.

Here’s how I did it:

1) I installed everything and got the server (slapd) running. Refer to another guide on here that tells you how to do this.
2) use slapcat on old machine to export the database:

slapcat -n 1 > /root/slapcat.dump

3) scp that over to the new machine.
4) Lets format our entries and then go ahead and import them with slapadd.

egrep -v '^entryCSN:' < /root/slapcat.dump > /root/ldapdump # /etc/init.d/slapd stop # slapadd -l /root/ldapdump

5)

/etc/init.d/slapd start

Thats it!

Note: I created the database and created the admin user so i took out anything in my slapcat.dump file regarding that
and only left user and group creation statements.

Blog Logo

Mario Loria


Published

Image

./scriptthe.net

Because 127.0.0.1 gets old after a while.

Back to Overview