如何解决 Alfresco LDAP“通过电子邮件地址登录”的难题?

如何解决 Alfresco LDAP“通过电子邮件地址登录”的难题?

我已安装 Alfresco(在 Windows 上)以使用 LDAP-AD 身份验证模型。当用户仅使用其用户名登录时,它会正确创建帐户并允许访问。但是,如果他们通过电子邮件地址登录,它会将他们登录到一个“损坏的”帐户。他们的任何东西都无法访问,甚至不会显示为真实帐户。

我同意将电子邮件地址登录重定向到普通的用户名登录,或者完全拒绝电子邮件地址登录。

看来如果我们再也不需要添加任何用户,我可以synchronization.autoCreatePeopleOnLogin = false在配置中做一些事情来防止这些电子邮件部分帐户。但是,我们的环境中有新人需要频繁自动添加(足以让每次调整配置和重置服务很快就会变得过时),并且 LDAP-AD 配置需要自动创建(手动帐户创建选项呈灰色)。

还有其他想法吗?

编辑-添加配置,因为这听起来像是我做了某件事导致的,而不是缺少某些东西......

### Active Directory Integration ###
authentication.chain=passthru1:passthru,ldap1:ldap-ad
passthru.authentication.sso.enabled=false
passthru.authentication.allowGuestLogin=false
passthru.authentication.authenticateCIFS=false
passthru.authentication.authenticateFTP=false
passthru.authentication.servers=domain.com
passthru.authentication.domain=DOMAIN
passthru.authentication.useLocalServer=false
passthru.authentication.defaultAdministratorUserNames=specialadminaccount
passthru.authentication.connectTimeout=5000
passthru.authentication.offlineCheckInterval=300
passthru.authentication.protocolOrder=TCPIP,NETBIOS
ldap.authentication.active=false
ldap.authentication.java.naming.security.authentication=simple
ldap.authentication.userNameFormat=%s
ldap.authentication.allowGuestLogin=false
ldap.authentication.java.naming.factory.initial=com.sun.jndi.ldap.LdapCtxFactory
ldap.authentication.java.naming.provider.url=ldap://domain.com:389
ldap.authentication.escapeCommasInBind=false
ldap.authentication.escapeCommasInUid=false
ldap.synchronization.active=true
ldap.synchronization.java.naming.security.principal= DOMAIN\\specialadminaccount
ldap.synchronization.java.naming.security.credentials=password
ldap.synchronization.queryBatchSize=1000
ldap.synchronization.groupDifferentialQuery=(&(objectclass=nogroup)(!(modifyTimestamp<\={0})))
ldap.synchronization.personQuery=(&(objectclass=user)(userAccountControl\:1.2.840.113556.1.4.803\:\=512))
ldap.synchronization.personDifferentialQuery=(& (objectclass=user)(!(modifyTimestamp<\={0})))
ldap.synchronization.groupQuery=(objectclass\=group)
ldap.synchronization.groupSearchBase=cn\=users,dc=domain,dc=com
ldap.synchronization.userSearchBase=cn\=users,dc=domain,dc=com
ldap.synchronization.modifyTimestampAttributeName=modifyTimestamp
ldap.synchronization.timestampFormat=yyyyMMddHHmmss’.0Z’
ldap.synchronization.userIdAttributeName=sAMAccountName
ldap.synchronization.userFirstNameAttributeName=givenName
ldap.synchronization.userLastNameAttributeName=sn
ldap.synchronization.userEmailAttributeName=mail
ldap.synchronization.userOrganizationalIdAttributeName=msExchALObjectVersion
ldap.synchronization.defaultHomeFolderProvider=userHomesHomeFolderProvider
ldap.synchronization.groupIdAttributeName=cn
ldap.synchronization.groupType=Nogroup
ldap.synchronization.personType=user
ldap.synchronization.groupMemberAttributeName=member
synchronization.synchronizeChangesOnly=false

答案1

另请参阅https://forums.alfresco.com/forum/installation-upgrades-configuration-integration/configuration/ldap-authentication-ad-email#comment-155600看看发生了什么事。

问题是 alfresco 进行了 dn 查找,但没有搜索对象,然后尝试使用密码登录。

在这种情况下,您必须格外小心您的 dn 在 ldap 中的外观。

请查看屏幕截图,尽管所有其他属性都相同,但 dn 的识别却有所不同,我只能通过[电子邮件保护]但其他登录无效。

属性变化如下

ldap.authentication.userNameFormat=mail=%s,ou=people,dc=organisation,dc=com
ldap.synchronization.userIdAttributeName=mail

在此处输入图片描述

相关内容