[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: Is there any tool to dump the data out from the database?

Angela Liang wrote:

> I've added some data into the database. I am not sure if there is a tool
> that I can dump the data out so I can practicing other commands such as
> modify, delete, modrdn, etc...
> When I practiced adding, I don't remember what I entered and what
> successfully get entered.
> Thank you in advance for your help.
> Angela

The "ldapsearch" tool that was built when you installed OpenLDAP is quite
useful in this regard.  For example, to see all the visible objects in the
entire LDAP directory, do something like this:

    ldapsearch -b 'o=My Company, c=US' '(objectclass=*)'

where 'o=MyCompany, c=US' is the base DN that you defined for your
database.  There is a man page that defines all the other command line
options as well.

The search expression is any legal LDAP filter -- see RFC 2254 for more
info.  In the example above, it says "return objects that have any value
for the objectclass attribute".  Since every object has to have an
objectclass, this essentially returns you the entire database that is
visible (based on your access rules) to an unauthenticated login.

Craig McClanahan