Hallo,
first I m a beginner in using ldap. My question: What s the best way to export the whole content of a ldap-directory starting with cn=name;dc=de using only a shell and ldap-commands.
Thanks for hints. Prengel Ralf
Hallo,
first I m a beginner in using ldap. My question: What s the best way to export the whole content of a ldap-directory starting with cn=name;dc=de using only a shell and ldap-commands.
Hello Ralf,
Try something like (depends a bit on your OS): ldapsearch -b 'your base dn' -D 'your user ' -w 'password' cn=* > somefile.txt
Cheers,
Claus
Kick, Claus wrote:
Try something like (depends a bit on your OS): ldapsearch -b 'your base dn' -D 'your user ' -w 'password' cn=* > somefile.txt
One should rather use "*" "+" as 'attributes' to also get operational attributes (if needed). And the filter above does not catch entries which does not have a attribute 'cn' at all.
So this would be a better example (in one line):
ldapsearch -x -b <search-base> -D <bind-DN> -w <password> "(objectClass=*)" "*" "+"
Note that the entity specified by the bind-DN should have full read access to the whole content. The server's rootdn has full access circumventing all ACLs.
Ciao, Michael.
Try using this:
slapcat > base.ldap
Cheers,
On Tue, Apr 8, 2008 at 11:23 AM, Michael Ströder michael@stroeder.com wrote:
Kick, Claus wrote:
Try something like (depends a bit on your OS): ldapsearch -b 'your base dn' -D 'your user ' -w 'password' cn=* > somefile.txt
One should rather use "*" "+" as 'attributes' to also get operational attributes (if needed). And the filter above does not catch entries which does not have a attribute 'cn' at all.
So this would be a better example (in one line):
ldapsearch -x -b <search-base> -D <bind-DN> -w <password> "(objectClass=*)" "*" "+"
Note that the entity specified by the bind-DN should have full read access to the whole content. The server's rootdn has full access circumventing all ACLs.
Ciao, Michael.
Ralf Prengel wrote:
What s the best way to export the whole content of a ldap-directory starting with cn=name;dc=de using only a shell and ldap-commands.
If you have access to the database files using command-line slapcat to export the whole content is the best option.
Please give more details of you want if that answer doesn't suit your needs.
Ciao, Michael.
openldap-software@openldap.org