`

LDAP error Code 及解决方法

阅读更多
原文地址:http://blog.csdn.net/techchan/article/details/5440775

1.  error code 53

===========================================================================

问题:创建新用户时出现数据后端异常

在 WebSphere Portal Express 中,您可以设置密码的最短和最长长度。如果设置的密码长度与 LDAP 服务器的策略不相同,则在创建用户时您可能会看到以下异常:

EJPSG0015E: Data Backend Problem com.ibm.websphere.wmm.exception.WMMSystemException:

The following Naming Exception occurred during processing:

"javax.naming.OperationNotSupportedException: [LDAP: error code 53 - 0000052D:

SvcErr: DSID-031A0FBC, problem 5003 (WILL_NOT_PERFORM), data 0

]; remaining name 'cn=see1anna,cn=users,dc=wps510,dc=rtp,dc=raleigh,dc=ibm,dc=com';

resolved object com.sun.jndi.ldap.LdapCtx@7075b1b4".

原因:这是由于“密码不能满足密码策略的要求”导致

解决方案:

1. 打开域安全策略-安全设置-账户策略-密码策略-密码必须符合复杂性要求。定义这个策略设置为:已禁用。/ 密码长度最小值:定义这个策略设置为0。

2. 打开域控制器安全策略-安全设置-账户策略-密码策略-密码必须符合复杂性要求。定义这个策略设置为:已禁用。/ 密码长度最小值:定义这个策略设置为0。

3. 最后运行刷新组策略命令为:gpupdate /force

===========================================================================

2. Need to specify class name

===========================================================================

javax.naming.NoInitialContextException: Need to specify class name in environment or system property, or as an applet parameter, or in an application resource file:  java.naming.factory.initial

原因:LdapContext在处理完上个环节被close(),LdapContext=null;

解决方案:不close;

3. error code 50

===========================================================================

javax.naming.NoPermissionException: [LDAP: error code 50 - 00002098: SecErr: DSID-03150A45, problem 4003 (INSUFF_ACCESS_RIGHTS), data 0

4. error code 68

===========================================================================

javax.naming.NameAlreadyBoundException: [LDAP: error code 68 - 00000524: UpdErr: DSID-031A0F4F, problem 6005 (ENTRY_EXISTS), data 0

原因:创建的用户已经存在了


7. No trusted certificate

===========================================================================

javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: No trusted certificate found

1.cas机器A,A上a,b,c服务运行良好

2.website 位于B机器,cas可以截获请求,跳转javax.net.ssl.SSLHandshakeException

将A上生生成的客户端密钥,导入B

A运行

sudo keytool -genkey -alias tomcat -keyalg RSA -keypass changeit -storepass changeit -keystore server.keystore -validity 3600

$ keytool -export -trustcacerts -alias tomcat -file server.cer -keystore server.keystore -storepass changeit

$ sudo keytool -import -trustcacerts -alias tomcat -file server.cer -keystore $JAVA_HOME/jre/lib/security/cacerts -storepass changeit

B运行最后一句即可

建立信任关系,客户,服务密钥,客户多处

8. error code 1

===========================================================================

javax.naming.NamingException: [LDAP: error code 1 - 00000000: LdapErr: DSID-0C090AE2, comment: In order to perform this operation a successful bind must be completed on the connection., data 0, vece

原因:新增域用户的时候,ctx没有绑定管理员用户

解决方法:ctx.addToEnvironment(Context.SECURITY_PRINCIPAL, adminUser + "@" + ldapProperty.getDomain());

ctx.addToEnvironment(Context.SECURITY_CREDENTIALS, adminPwd);

9. error code 50

==========================================================================

javax.naming.NoPermissionException: [LDAP: error code 50 - 00000005: SecErr: DSID-03151E04, problem 4003 (INSUFF_ACCESS_RIGHTS)

原因:新建域用户时候,ctx绑定到一个普通用户(该用户没有新建用户的权限)

解决方法:使用管理员用户进行绑定:

          ctx.addToEnvironment(Context.SECURITY_PRINCIPAL, adminUser + "@" + ldapProperty.getDomain());

ctx.addToEnvironment(Context.SECURITY_CREDENTIALS, adminPwd);

10. error code 19

==========================================================================

javax.naming.directory.InvalidAttributeValueException: [LDAP: error code 19 - 0000052D: AtrErr: DSID-03190F00, #1:

0: 0000052D: DSID-03190F00, problem 1005 (CONSTRAINT_ATT_TYPE)

原因:这个最大的可能是不满足域安全策略:如密码复杂性、密码最短使用期限、强制密码历史。即长度、包含的字符、多久可以修改密码、是否可以使用历史密码等。

11. LDAP: error code 50

==========================================================================

javax.naming.NoPermissionException: [LDAP: error code 50 - 00000005: SecErr: DSID-031A0F44, problem 4003 (INSUFF_ACCESS_RIGHTS)

原因:这个是最初代码使用的replace操作,这个在AD里对应的是密码重设(普通用户默认没有这个权限,管理员可以操作),另外remove操作时提供的旧密码错误也可能报这个异常

12. RSA premaster secret error

==========================================================================

javax.naming.CommunicationException: simple bind failed: 172.18.20.4:636 [Root exception is javax.net.ssl.SSLKeyException: RSA premaster secret error]

原因:Tomcat 配置的JDK与添加证书的的JDK不一致。如:证书存放路径为C:/Java/jdk1.6.0_10/jre/lib/cacerts  而Tomcat 配置的JDK为C:/Java/jre6 ,使得两者路径不一致,SSL验证的时候,找不到证书

13.No trusted certificate found

==========================================================================

javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: No trusted certificate found

原因:信任证书库文件路径不正确

解决方法:将正确工程中 /WEB-INF/classes目录下
分享到:
评论

相关推荐

    LDAP error code 一览表

    使用LDAP的朋友应该用得上,调试的时候很有帮助的。

    Active Directory,AD, LDAP+error+code+一览表

    LDAP开发过程中会出现的错误代号及相应错误内容

    ldap提示object class violation

    ldap提示object class violation

    LDapper X - ver2.0.4

    .Now uses the Mac OS X LDAP framework rather than compiled OpenLDAP code. It believe that the version is OpenLDAP 2.2.19. Operating System Requirements: This product is designed to run on the ...

    JDK_1_6 API

    javax.naming.ldap 提供对 LDAPv3 扩展操作和控件的支持。 javax.naming.spi 提供一些方法来动态地插入对通过 javax.naming 和相关包访问命名和目录服务的支持。 javax.net 提供用于网络应用程序的类。 javax.net....

    最完整的Toad For Oracle使用手册

    Viewing Source Surrounding a PL/SQL Error 863 Dataset Operations 864 Data Grids 866 DBMS Output 881 Finding Data 883 Generate Test Data 890 Working with Database Objects 896 Schema Browser Overview ...

    php.ini-development

    error_reporting ; Default Value: E_ALL & ~E_NOTICE & ~E_STRICT & ~E_DEPRECATED ; Development Value: E_ALL ; Production Value: E_ALL & ~E_DEPRECATED & ~E_STRICT ; html_errors ; Default Value: On ; ...

    spring-boot-reference.pdf

    11.3. Writing the Code 11.3.1. The @RestController and @RequestMapping Annotations 11.3.2. The @EnableAutoConfiguration Annotation 11.3.3. The “main” Method 11.4. Running the Example 11.5. Creating ...

    Beginning Python (2005).pdf

    Using Python Objects from C Code 380 Summary 383 Exercises 383 Chapter 18: Writing Shareware and Commercial Programs 385 A Case Study: Background 385 How Much Python Should You Use? 386 02_...

    Python Cookbook, 2nd Edition

    Using the Code from This Book Audience Organization Further Reading Conventions Used in This Book How to Contact Us Safari® Enabled Acknowledgments Chapter 1. Text Introduction ...

Global site tag (gtag.js) - Google Analytics