当前位置: 首页 > 工具软件 > jCIFS > 使用案例 >

通过Jcifs包实现NTLM认证

陆海阳
2023-12-01

jcifs Jar包下载地址https://www.jcifs.org/

在使用中报错

jcifs.smb.SmbException: NTLMv2 requires extendedsecurity (jcifs.smb.client.useExtendedSecurity must be

true ifjcifs.smb.lmCompatibility >=3
 

为了确保兼容性设置COMPATIBILITY生效我们需要下载源码并修改jcifs.smb.NtlmPasswordAuthentication,将44行LM_COMPATIBILITY变量去掉final声明。eclispe下会自动生成编译的class类。我们用winrar打开原jar包,拖入替换该类。

 类似资料: