Using ldapsearch to pull some entities from LDAP server. The result will be of type:
dn: cn=systemuser,cn=system,cn=Users,dc=ds,dc=domain,dc=int
middlename:: 2HR0ZXJuYXZu
givenname:: RuVybmF2bg==
sn:: xnR0ZXJuYXZu
...
Now if I want to do ldapdelete on this output it turns out that the "dn: " part on line 1 is causing problems for ldapdelete. So need to do some grep-and-remove first.
Is this really so, that the ldapsearch, ldapmodify and ldapdelete are incompatible when it comes to ldif-format.
This "dn: "-prefix should not cause trouble for ldapdelete really, should it?
The reason for asking is that we want to maintain ldap structure with one ldif-file, using the same file for both ldapadd and ldapdelete. Do not want to introduce changetype either as that would cause two files as well.
dn: cn=systemuser,cn=system,cn=Users,dc=ds,dc=domain,dc=int
middlename:: 2HR0ZXJuYXZu
givenname:: RuVybmF2bg==
sn:: xnR0ZXJuYXZu
...
Now if I want to do ldapdelete on this output it turns out that the "dn: " part on line 1 is causing problems for ldapdelete. So need to do some grep-and-remove first.
Is this really so, that the ldapsearch, ldapmodify and ldapdelete are incompatible when it comes to ldif-format.
This "dn: "-prefix should not cause trouble for ldapdelete really, should it?
The reason for asking is that we want to maintain ldap structure with one ldif-file, using the same file for both ldapadd and ldapdelete. Do not want to introduce changetype either as that would cause two files as well.