directory-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Emmanuel Lécharny <>
Subject Re: LdifAnonymizer: No file to anonymize... when using client API?
Date Wed, 26 Sep 2018 21:31:53 GMT

Le 26/09/2018 à 22:50, Robinson, James F a écrit :
> I'm a newcomer to LDAP trying to assemble what should be a very simple tool: take a user
name, attempt to connect to an Active Directory server and bind on UID only, so that it pops
a password dialog, so that I can authenticate the user of a particular application. I don't
need anything more advanced than "is this a valid DN, and if it is can you ask them for a
password and let me know if it's valid?"

> My code, trivial as it is, is failing to even launch, because LdifAnonymizer throws an
exception that there's "No file to anonymize." Poking through the source, ldap.client.api.LdifAnonymizer
appears to do this when launched as a standalone application without a file being passed in
as a parameter. But I'm not trying to launch anything, so I'm not sure what is, or why. I
have the following libraries added to Eclipse as "Referenced libraries:"
>                 api-asn1-api-2.0.0.AM2.jar
>                 api-asn1-ber-2.0.0.AM2.jar
>                 api-ldap-client-api-2.0.0.AM2.jar
>                 api-ldap-codec-core-2.0.0.AM2.jar
>                 api-ldap-model-2.0.0.AM2.jar
>                 mina-core-2.0.18.jar
>                 slf4j-api-1.7.25.jar
> This is the minimum set of libraries necessary to resolve all dependencies generated
by api-ldap-client-api-2.0.0.AM2.jar. 

You can also use api-all.jar which contains what is needed in one single

I don't know what is your code, I can't tell what is going wrong, except
that the LddifAnonymizer.main() function is getting called. If you are
running your code in eclipse, make sure that the right main() method is
selected (Eclipse can pick one for you, and this is the only one present
in the LDAP API).

I haven't touched any configuration files. Everything's as it was
downloaded. I'm obviously doing something wrong, but from both the "Five
Minutes[sic] Tutorial" (should be "Minute," singular-English is funny
that way) and what I can find in the User Manual, the client should act
like a client, not attempt to install or run any services. Yet the User
Manual only mentions Ldif in terms of adding records to a DS server, and
I have no interest at all in doing that. I just want to connect and bind
to a remote AD server, get my yes/no authentication result, and unbind.

It should work, if you launch your app and if your app has a main().

PS: I have fixed the 'Five Minute(s)' thing

Emmanuel Lecharny

View raw message