如何从Unix中找到Active Directory域控制器的IP?

时间:2022-03-01 02:59:17

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?

我可以通过NSLOOKUP在Windows机器上获取名称服务器并通过WMI VBS脚本获取AD DC,但我不能使用Unix服务器(可以ping命名服务器)的VBS脚本。我想使用Java从Unix框中获取所有Active Directory域控制器。这可能吗?

3 个解决方案

#1


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?

如果您可以查询DNS服务器,是否无法对其服务记录执行查询以发现可以充当域控制器的计算机?

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

这就是Windows工作站找到他们的候选域控制器的方式。

#2


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.

我建议你研究java.net包,它包含各种类,如INetAddress,URLConnection和各种你可能会觉得有用的套接字类。

#3


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

是的,您可以像标准LDAP一样连接到它。您可以使用OpenLDAP库:

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

#1


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?

如果您可以查询DNS服务器,是否无法对其服务记录执行查询以发现可以充当域控制器的计算机?

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

这就是Windows工作站找到他们的候选域控制器的方式。

#2


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.

我建议你研究java.net包,它包含各种类,如INetAddress,URLConnection和各种你可能会觉得有用的套接字类。

#3


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

是的,您可以像标准LDAP一样连接到它。您可以使用OpenLDAP库:

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