我尝试从Ldap服务器导入用户。
这是我的Ldap用户:
Liferay Portal ldap设置:
点击"测试Ldap用户"用户也会显示。 问题是liferay日志文件中没有错误,但没有用户导入是否有任何错误我正在做。任何帮助将不胜感激。
更新
05:47:16,332 DEBUG [http-bio-8787-exec-7][PortalLDAPUtil:41] -- listing properties --__java.naming.factory.initial=com.sun.jndi.ldap.LdapCtxFactory__java.naming.provider.url=ldap://142.56.23.10:389/__com.sun.jndi.ldap.connect.timeout=500__java.naming.security.principal=cn=Directory Manager__com.sun.jndi.ldap.connect.pool=true__java.naming.security.credentials=cpassword__java.naming.referral=follow__com.sun.jndi.ldap.read.timeout=15000__ [Sanitized]
05:48:28,710 DEBUG [liferay/scheduler_dispatch-1][PortalLDAPUtil:41] -- listing properties --__java.naming.factory.initial=com.sun.jndi.ldap.LdapCtxFactory__java.naming.provider.url=ldap://142.56.23.10:389/__com.sun.jndi.ldap.connect.timeout=500__java.naming.security.principal=cn=Directory Manager__com.sun.jndi.ldap.connect.pool=true__java.naming.security.credentials=cpassword__java.naming.referral=follow__com.sun.jndi.ldap.read.timeout=15000__ [Sanitized]
05:48:28,714 DEBUG [liferay/scheduler_dispatch-1][LDAPSettingsUtil:41] -- listing properties --__password=userPassword__lastName=sn__screenName=uid__firstName=givenName__emailAddress=mail__ [Sanitized]
05:48:28,714 DEBUG [liferay/scheduler_dispatch-1][LDAPSettingsUtil:41] -- listing properties --__ [Sanitized]
05:48:28,715 DEBUG [liferay/scheduler_dispatch-1][LDAPSettingsUtil:41] -- listing properties --__ [Sanitized]
05:48:28,715 DEBUG [liferay/scheduler_dispatch-1][LDAPSettingsUtil:41] -- listing properties --__ [Sanitized]
05:48:28,715 DEBUG [liferay/scheduler_dispatch-1][LDAPSettingsUtil:41] -- listing properties --__ [Sanitized]
05:48:28,717 DEBUG [liferay/scheduler_dispatch-1][LDAPSettingsUtil:41] -- listing properties --__password=userPassword__lastName=sn__screenName=uid__firstName=givenName__emailAddress=mail__ [Sanitized]
05:48:28,718 DEBUG [liferay/scheduler_dispatch-1][LDAPSettingsUtil:41] -- listing properties --__ [Sanitized]
05:48:28,718 DEBUG [liferay/scheduler_dispatch-1][LDAPSettingsUtil:41] -- listing properties --__ [Sanitized]
05:48:28,719 DEBUG [liferay/scheduler_dispatch-1][LDAPSettingsUtil:41] -- listing properties --__ [Sanitized]
05:48:28,721 DEBUG [liferay/scheduler_dispatch-1][PortalLDAPUtil:593] LDAP user attribute sn: Amar
05:48:28,722 DEBUG [liferay/scheduler_dispatch-1][PortalLDAPUtil:593] LDAP user attribute userPassword: [B@d586ba
05:48:28,722 DEBUG [liferay/scheduler_dispatch-1][PortalLDAPUtil:593] LDAP user attribute uid: user.0
05:48:28,722 DEBUG [liferay/scheduler_dispatch-1][PortalLDAPUtil:593] LDAP user attribute givenName: Aaccf
05:48:28,723 DEBUG [liferay/scheduler_dispatch-1][PortalLDAPUtil:593] LDAP user attribute mail: user.0@maildomain.net
05:48:28,723 DEBUG [liferay/scheduler_dispatch-1][DefaultLDAPToPortalConverter:102] Screen name user.0 and email address user.0@maildomain.net
05:48:28,723 INFO [liferay/scheduler_dispatch-1][PortalLDAPImporterImpl:1226] Skipping user user.0@maildomain.net because the LDAP entry was never modified
05:48:28,738 DEBUG [liferay/scheduler_dispatch-1][PortalLDAPUtil:41] -- listing properties --__java.naming.factory.initial=com.sun.jndi.ldap.LdapCtxFactory__java.naming.provider.url=ldap://142.56.23.10:389/__com.sun.jndi.ldap.connect.timeout=500__java.naming.security.principal=cn=Directory Manager__com.sun.jndi.ldap.connect.pool=true__java.naming.security.credentials=cpassword__java.naming.referral=follow__com.sun.jndi.ldap.read.timeout=15000__ [Sanitized]
05:48:28,738 DEBUG [liferay/scheduler_dispatch-1][LDAPSettingsUtil:41] -- listing properties --__password=userPassword__lastName=sn__screenName=uid__firstName=givenName__emailAddress=mail__ [Sanitized]
答案 0 :(得分:1)
您可以通过调高日志级别来调试ldap相关的软件包/类来进一步排除故障。在生产过程中要非常小心,因为日志会很快填满。
转到Control Panel > Server Administration > Log Levels
将日志级别设置为“ALL
”以获取以下内容:
点击“Add Category
”按钮
使用“com.liferay.portal.security.ldap.PortalLDAPImporter
”日志级别添加“ALL
”
以上日志级别帮助我多次调试LDAP导入问题。您还可以使用Tobias的建议进行测试,并在日志处于调试级别时单击test user import
按钮,以便了解正在进行的操作。
您还应该验证登录时是否发生了单个用户导入(通过登录然后检查日志)。
您可以通过重新启动服务器或将级别恢复为之前的级别,将日志级别重置为默认值,方法是按照上述过程手动重置。
希望这有帮助。
答案 1 :(得分:0)
默认情况下,OpenDJ具有访问日志(日志/访问权限),它将在建立连接时包含消息,以及在这些连接上发生的操作的一些详细信息。