jcifs的NTLMHTTP验证及所犯错误
来源:互联网 发布:木子软件 官网app 编辑:程序博客网 时间:2024/05/22 06:10
一、错误提示:0xC0000022: jcifs.smb.SmbAuthException: Access is denied
The NTLM HTTP SSO Filter that used to be included withJCIFS cannot support NTLMv2.
1) jcifs.smb.lmCompatibility = 0 or 1: SendLM and NTLM
2) jcifs.smb.lmCompatibility = 2: Send NTLM in both fields
3) jcifs.smb.lmCompatibility = 3, 4, or 5: Send just LMv2
1、使用包:jcifs-1.3.14.jar
2、Eclipse的web工程中的web.xml配置:下面黑体配置,解决了错误。
<?xml version="1.0"encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" xsi:schemaLocation="http://java.sun.com/xml/ns/javaeehttp://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" id="WebApp_ID"version="2.5">
<display-name>ITSystemSSO</display-name>
<filter>
<filter-name>WebServicesFilter</filter-name>
<filter-class>com.channelsoft.sso.ipfilter.IpFilter</filter-class>
</filter>
<filter-mapping>
<filter-name>WebServicesFilter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<filter>
<filter-name>NtlmHttpFilter</filter-name>
<filter-class>jcifs.http.NtlmHttpFilter</filter-class>
<init-param>
<param-name>jcifs.http.domainController</param-name>
<param-value>10.130.1.9</param-value>
</init-param>
<init-param>
<param-name>jcifs.smb.lmCompatibility</param-name>
<param-value>0</param-value>
</init-param>
<init-param>
<param-name>jcifs.smb.client.useExtenededSecurity</param-name>
<param-value>false</param-value>
</init-param>
<init-param>
<param-name>jcifs.smb.client.soTimeout</param-name>
<param-value>35000</param-value>
</init-param>
</filter>
<filter-mapping>
<filter-name>NtlmHttpFilter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<filter>
<filter-name>DenyFilter</filter-name>
<filter-class>com.channelsoft.sso.deny.DenyAll</filter-class>
</filter>
<filter-mapping>
<filter-name>DenyFilter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<welcome-file-list>
<welcome-file>index.html</welcome-file>
<welcome-file>index.htm</welcome-file>
<welcome-file>index.jsp</welcome-file>
<welcome-file>default.html</welcome-file>
<welcome-file>default.htm</welcome-file>
<welcome-file>default.jsp</welcome-file>
</welcome-file-list>
</web-app>
3、说明
http://lists.samba.org/archive/jcifs/2004-February/003069.html
http://www.ioplex.com/d/jespa/api/jespa/ntlm/NtlmSecurityProvider.html
二、错误提示:jcifs.smb.SmbException: NTLMv2 requires extendedsecurity (jcifs.smb.client.useExtendedSecurity must betrue ifjcifs.smb.lmCompatibility >=3)
如果已经增加了上面黑体部分,则需重启tomcat服务器。
三、调试java web程序,时替换jar包,旧jar包修改名称后继续保存在\WebContent\WEB-INF\lib文件夹下,加载旧包,而没有重新加载新包。
- jcifs的NTLMHTTP验证及所犯错误
- JCIFS NTLM HTTPAuthenticationJCIFS使用NTLMHTTP认证
- jcifs-windows密码验证的方式
- 编程常犯错误避免所要遵循的原则
- C++基础 之 所犯错误
- jCIFS
- jCIFS
- JCIFS
- jCIFS
- jcifs
- JCIFS
- JCIFS
- CString的工作原理介绍及易犯错误
- jCIFS非法用户名验证绕过漏洞
- jcifs技术实现单点登录,获取客户端的域名及登录ID
- 我的 常犯错误
- 两种不用空间开销的变量交换方式及易犯错误(局限性)
- iPhone初学的常犯错误
- windows phone:关于ListBox中item容器自动延展以填满空间
- The Property Function
- uva103 - Stacking Boxes(动归,记忆化搜索)
- App:Application 替换为 App:BaseApp
- 开源项目之Android undergarment(导航)
- jcifs的NTLMHTTP验证及所犯错误
- 重置mysql root 密码
- ConvertUtils 字符串和各种类型数据间进行转换
- 虚拟网络链接不上
- (2)Cocos2d-x在windows平台下的环境搭建
- Excel地址转换
- Silverlight中使用Grid创建自定义的Table表格
- Study notes for Expectation Maximum Algorithm
- word文档中插入特殊字符