[jcifs] Re: jcifs.http.domainController

Michael B Allen mba2000 at ioplex.com
Wed Sep 7 17:49:04 GMT 2005


On Wed, 07 Sep 2005 17:41:51 +0200
Oliver Schoett <os at sdm.de> wrote:

> Michael B Allen wrote:
> 
> My client would like to avoid WINS, which seems reasonable given that 
> Windows clients from Windows 2000 onwards can locate their domain 
> controllers not via WINS, but via DNS (see 
> http://www.microsoft.com/technet/prodtechnol/windowsserver2003/library/ServerHelp/b05eb382-d13a-4eb5-ac6e-01ebc1450dac.mspx).  

Interesting! I didn't know this. Try this:

1) replace jcifs/smb/SmbSession.java:95 with:

	InetAddress[] list = InetAddress.getAllByName("_ldap._tcp." + DNS_DOMAIN );

2) replace all NbtAddress types to InetAddress as necessary to resolve
any type mismatches in jcifs/smb/SmbSession.java. For example line 66
would be:

	InetAddress[] dc_list = null;

3) Then add a new property at the top of SmbSession.java for the
DNS_DOMAIN (note we can't overload the jcifs.smb.client.domain
property because that is used for authentication too).

    private static final String DNS_DOMAIN =
		Config.getProperty("jcifs.smb.client.dns_domain", null);

Now set the jcifs.smb.client.dns_domain to the DNS domain name like
'megacorp.com'.

Actually, the FIRST thing you should do is write a very small simple test
program like examples/ListDC.java to see that the _ldap._tcp.megacorp.com
lookup actually works like the technet article claims.

Otherwise, no I can't think of a way to do backup domain controllers
without WINS.

Mike



More information about the jcifs mailing list