Hi there.
I'm trying to merge entries from one tree into another, but the DN format for each tree is different. We're talking about inetOrgPerson entries, if that matters.
Specifically, the old DNs are of the form:
dn: cn=person,o=org,c=ca
And the new DNs are of the form:
dn: uid=username,ou=People,dc=example,dc=ca
I'm using OpenLDAP 2.1.19, and I suspect that slapd-meta might be able to do what I need.
All the examples I've been able to find seem to do with rewriting suffixes, however. I need to go slightly further and rewrite the DN itself.
Is this possible, or am I barking up the wrong tree?
Thanks very much for any assistance/configuration examples!
Nels Lindquist
Well...
I suggest you try to use "slapcat > olddn.ldif". After, you can open the ldif file with your prefered text editor(example: vi) and change all entries to the new dn.
But, you need create the new structure on ldap to accept this entries.
Do you understand?
Cheers.
On 6/6/07, Nels Lindquist nlindq@maei.ca wrote:
Hi there.
I'm trying to merge entries from one tree into another, but the DN format for each tree is different. We're talking about inetOrgPerson entries, if that matters.
Specifically, the old DNs are of the form:
dn: cn=person,o=org,c=ca
And the new DNs are of the form:
dn: uid=username,ou=People,dc=example,dc=ca
I'm using OpenLDAP 2.1.19, and I suspect that slapd-meta might be able to do what I need.
All the examples I've been able to find seem to do with rewriting suffixes, however. I need to go slightly further and rewrite the DN itself.
Is this possible, or am I barking up the wrong tree?
Thanks very much for any assistance/configuration examples!
Nels Lindquist
Gabriel Stein wrote:
I suggest you try to use "slapcat > olddn.ldif". After, you can open the ldif file with your prefered text editor(example: vi) and change all entries to the new dn.
That would certainly be a simple operation for changing the dn suffix globally, but changing from cn to uid would require manually editing every single entry. Is that really the only way?
Nels Lindquist
--On June 6, 2007 2:15:08 PM -0600 Nels Lindquist nlindq@maei.ca wrote:
Gabriel Stein wrote:
I suggest you try to use "slapcat > olddn.ldif". After, you can open the ldif file with your prefered text editor(example: vi) and change all entries to the new dn.
That would certainly be a simple operation for changing the dn suffix globally, but changing from cn to uid would require manually editing every single entry. Is that really the only way?
Given your ancient release, yes.
--Quanah
-- Quanah Gibson-Mount Principal Software Engineer Zimbra, Inc -------------------- Zimbra :: the leader in open source messaging and collaboration
On Jun 6, 2007, at 1:15 PM, Nels Lindquist wrote:
Gabriel Stein wrote:
I suggest you try to use "slapcat > olddn.ldif". After, you can open the ldif file with your prefered text editor(example: vi) and change all entries to the new dn.
That would certainly be a simple operation for changing the dn suffix globally, but changing from cn to uid would require manually editing every single entry. Is that really the only way?
Nels Lindquist
Writing some perl to do that using regular expressions would be fairly simple. Or perhaps awk if you're inclined.
openldap-software@openldap.org