views:

1944

answers:

3

I can get the nameserver via NSLOOKUP on a Windows machine and get an AD DC via a WMI VBS script, but I can't use the VBS script from a Unix server ( which can ping the nameserver). I'd like to use Java to obtain all the Active Directory domain controllers from a Unix box. Is this possible?

A: 

I'd suggest you to look into java.net package which contains various classes like INetAddress, URLConnection and various socket classes that you might find useful.

Epitaph
I'm aware of these classes...Can you be more specific?
lyates
A: 

Yeah, you can connect to it like standard LDAP. You can use the OpenLDAP Library:

http://www.openldap.org/jldap/

BobbyShaftoe
I'd need the IP to connect to...
lyates
'Tis the basis of my question.
lyates
+1  A: 

If you can query the DNS Server, can't you perform a query for its service records to discover computers that can act as Domain Controllers?

That's how Windows Workstations find their candidate Domain Controllers.

Allain Lalonde