[jcifs] Re: SPNEGO NTLM

eglass1 at comcast.net eglass1 at comcast.net
Wed Jun 23 20:29:16 GMT 2004


Yes, I've done some updates but haven't posted them (still working on some
other items, and have some more tweaks to make).  I'm looking at next week
sometime posting an update to that, as well as the RAP stuff.

Eric


> Jeffrey Winter <jeffreywinter <at> gmail.com> writes:
> 
> Actually, I believe I discovered the problem:
> 
> In Authenticate.processNtlm() you're only creating
> the challenge for the Type2 token, not for the 
> NtlmPasswordAuthentication object.
> 
> I made a createChallenge() method in Authenticate
> from the code in the case 1 block and call
> it in both case 1 and case 3.  I am now able to
> authenticate in the "WWW-Authenticate" "Negotiate"
> mode wit NTLM
> 
> Thanks
> 
> 
> private byte[] createChallenge() 
>   throws SmbException, UnknownHostException
> {
>  boolean loadBalance = false;
>  String domainController =
>   getProperty("jcifs.http.domainController");
> 
>  if (domainController == null) {
>   domainController = getProperty("jcifs.smb.client.domain");
>   String balance = getProperty("jcifs.http.loadBalance");
>   loadBalance = (balance != null) ?
>   Boolean.valueOf(balance).booleanValue() : true;
>  }
> 
>  UniAddress dc = loadBalance ? new UniAddress(
>    NbtAddress.getByName(domainController, 0x1c, null)) :
>    UniAddress.getByName(domainController, true);
> 
>   return SmbSession.getChallenge(dc);
> }
> 
> 
> 


More information about the jcifs mailing list