laimex for openldap exports

General Discussion about LDAP Administrator

Moderator: Support

laimex for openldap exports

Postby Igwah » Fri Dec 07, 2012 5:34 am


I'm trying to use laimex to export a list of all objects in an openldap LDAP directory. I can get "configuration" information from the directory fine using laimex, but whenever I try and iterate an OU containing user objects and return their attributes, I get an error "Error [L: -1, C: -1] LDAP Operations error occurred".

The query that works and returns configuration data is:

laimex /s /d CSV /f ldapexport.csv

The query which returns "Error [L: -1, C: -1] LDAP Operations error occurred" is:

laimex /s /page 1000 /r "ou=people,ou=us," /d CSV /f ldappeopleexport.csv

has anyone got a query which returns objects from OpenLDAP they can share to give me an idea where I'm going wrong? Or any advice on what the issue might be? The second query generates the same issue when I authenticate with a user in the directory.

Additionally, I can use the ldapbrowser tool or ldapadmin tool to connect to the directory fine and they export everything to CSV without a problem, but I can't script them, so I need laimex to work :(

Any help would be much appreciated!
Posts: 2
Joined: Fri Dec 07, 2012 5:23 am

Re: laimex for openldap exports

Postby Support » Fri Dec 07, 2012 9:43 am


The problem could be because you didn't specify authentication information in your command line string. Try to add user, pwd and mech command line parameters, e.g.

laimex /s /page 1000 /r "ou=people,ou=us," /d CSV /f ldappeopleexport.csv /mech SIMPLE /user USERNAME /pwd PASSWORD

/user user
Specifies the user name used for authentication to the directory server

/pwd password
Specifies the user's password to authenticate to the directory server.

/mech value
Specifies the negotiation mechanism to use while authenticating to the server. Possible values are:
If this parameter is omitted, the GSS-SPNEGO will be used by default.
Posts: 895
Joined: Sun Aug 12, 2001 12:00 am

Re: laimex for openldap exports

Postby Igwah » Sun Dec 09, 2012 11:53 pm

Hi Support,

Thank you for the prompt reply.

The only authentication mechanism which worked forme was GSS-SPNEGO. If I use simple I get a fatal error "cannot contact the ldap server" and if I use digest-md5 I get a "The supplied credntial is invalid" error. Note that using the ldapadmin or ldapbrowser tool, I can connect without authentication and export single objects without issue.

So, my command now looks like this:

laimex /s /page 1000 /r "ou=people,ou=us," /d CSV /f ldappeopleexport.csv /mech GSS-SPNEGO /user USERNAME /pwd PASSWORD

And it returns the following:

Waiting for the schema... completed
Exporting document...
Requesting data from server. Waiting for response...
Error [L: -1, C: -1]: LDAP operations error occurred.
Export completed.

The export file contains no information aside from the headers which are prefixed to each CSV export.

Do you have any other suggestions or alternatively is there a way to get more information from the error?

Thanks alot for your assistance thus far.
Posts: 2
Joined: Fri Dec 07, 2012 5:23 am

Re: laimex for openldap exports

Postby Support » Mon Dec 10, 2012 1:31 pm

Please, do the following:
1) Run LDAP Administrator
2) Right click on the profile and in the opened context menu select 'Properties'
3) In the Properies dialog that opens activate the Credentials tab
Make sure that the Mechanism, Principal and Password fields are exactly the same, as in your command line.

If everything is OK, try to set /pagesize 0 in your command line string. Maybe you server doesn't support paging.
Posts: 895
Joined: Sun Aug 12, 2001 12:00 am

Return to General Discussion

Who is online

Users browsing this forum: No registered users and 2 guests