Howto change the search base of an Open Directory server
I goofed up on my initial install of Panther. At some point during the upgrade from 10.2 to 10.3 server, the installer asked me what I wanted my search base to be. The installer offered ‘dc=local’ as a default. I absentmindedly accepted this.
I started getting irritated by this mistake when I started trying to integrate some other services with the ldap info on my 10.3 server. (WebCal and RT, to be specific.)
Here’s how to fix things:
1 – In Workgroup Manager, open your ldap directory in the Inspector panel
2 – Under Config->macosxodconfig, edit the comment dsAttr. Replace all references to ‘dc=wrong_info’ with ‘dc=my_domain,dc=com’
3 – Kill slapd
4 – ‘slapcat > /tmp/foobar’
5 – edit /tmp/foobar and replace all references to ‘dc=wrong_info’ with ‘dc=my_domain,dc=com’
6 – ‘mv /var/db/openldap/openldap-data /var/db/openldap/openldap-data.bak’
7 – ‘slapadd < /tmp/foobar’
8 – ‘cp /etc/openldap/slapd_macosxserver.conf /etc/openldap/slapd_macosxserver.conf.bak’
9 – edit /etc/openldap/slapd_macosxserver.conf and replace all references to ‘dc=wrong_info’ with ‘dc=my_domain,dc=com’
10 – ‘SystemStarter start LDAP’
11 – ‘kill -HUP’ your lookupd
12 – open Directory Access.app and change the search path of your LDAP server
That’s it!
If I’ve been unclear, I apologize. I hope that this helps someone.