Hi,
Let me know if this is the wrong list for this question, and where best to
ask this.

I am trying to write a simple program in java that "guesses" if the machine
is running on active directory and connects to the domain controller via
LDAP. My goal is to submit a patch to JXPlorer (and eventually other
software like apache directory studio) to "detect" active directory and
"auto-configure" a connection to it.

Right now I am grabing the envirormental variable "USERDNSDOMAIN", and
transforming it from "foo.com" to "dc=foo,dc=com". This works good enough.
However, Is it possible via some sort of LDAP query to get the base DN of
either the domain I am authenticated to, or better yet all domains in the
forest?

If anyone cares to help me in my research, or laugh at a .NET programmer
trying to write JAVA, feel free to take a poke at my code in SVN,
http://nightelves.svn.sourceforge.net/viewvc/nightelves/LI-PHP/LDAP/LDAP.Tests/src/LDAP/Tests.java?revision=57&view=markup

Thanks and Regards,

Justin Dearing

Reply via email to