In order to do this I
- used an example from :
http://hc.apache.org/httpcomponents-client-ga/ntlm.html
- downloaded the latest JCIFS library from :
http://jcifs.samba.org
- Changed the Type3Message initialisation in the JCIFSEngine class as it isn't
supported by he version of JCIFS that I downloaded
Type3Message t3m = new Type3Message(
t2m,
password,
domain,
username,
workstation);
was changed to
Type3Message t3m = new Type3Message(
t2m); //,
// password,
// domain,
// username,
// workstation);
t3m.setNTResponse(Type3Message.getNTResponse(t2m, password));
t3m.setLMResponse(Type3Message.getLMResponse(t2m, password));
t3m.setDomain(domain);
t3m.setUser(username);
t3m.setWorkstation(workstation);
I don't know if that is the correct way to do it, but it works.
No comments:
Post a Comment