[jcifs] NtlmHttpFilter requires username, password and wins server
Michael B Allen
mba2000 at ioplex.com
Tue Oct 5 22:31:39 GMT 2004
Panagiotis Korros said:
> I upgraded the jcifs.jar from v. 0.7.x to 1.1 and found out that my
> configuration was not working anymore.
> Until 0.7.x specifing the jcifs.smb.client.domain property was enough.
> In 1.1 the jcifs.smb.client.username, jcifs.smb.client.password and
> jcifs.netbios.wins are also required.
> This causes problems because I don't have a wins server on my network
> and also I would like not to expose the username/password in a text
> If I try without a wins server I get the following NullPointerException
> when I try to access a ntlm protected resource.
The jcifs.smb.client.domain property is highly dependant on
jcifs.netbios.wins. Your domain controller must be on the same subnet so
basically you got lucky. If you don't have WINS then you should really be
using jcifs.http.domainController with an IP or DNS name.
I don't know how you concluded that the username and password were
required. AFAIK they are not (although highly recommended for production
> java.lang.NullPointerException: null address || null buffer
> at java.net.PlainDatagramSocketImpl.send(Native Method)
> at java.net.DatagramSocket.send(DatagramSocket.java:611)
Although technically this is a bug that should be fixed (and will be
provided I can reproduce it).
> I hacked the code and saw that NbtAddress.getAllByName( DOMAIN, 0x1C,
> null, null ) doesn't work without a wins server but
> NbtAddress.getByName( DOMAIN, 0x1C, null, null ) does work. Why is that?
> Is it expected?
It's a bug. But again these lookups are highly dependant on WINS as these
NetBIOS lookups with fail if the DC is not within broadcast range. As soon
as you put a switch between JCIFS and the DC your setup will fail.
More information about the jcifs