05-13-2011 01:39 PM
# The default authentication chain
authentication.chain=alfrescoNtlm1:alfrescoNtlm,ldap1:ldap
In /opt/alfresco/tomcat/webapps/alfresco/WEB-INF/classes/alfresco/subsystems/Authentication/ldap/ldap-authentication.properties I have:
ldap.authentication.userNameFormat=cn=%s,dc=hostname,dc=domainname,dc=com
ldap.authentication.java.naming.factory.initial=com.sun.jndi.ldap.LdapCtxFactory
ldap.authentication.java.naming.provider.url=ldap://localhost:389
ldap.authentication.java.naming.security.authentication=simple
ldap.authentication.escapeCommasInUid=false
ldap.authentication.defaultAdministratorUserNames=admin1,admin2,admin3,admin4
ldap.synchronization.active=true
# The default principal to use (only used for LDAP sync)
ldap.synchronization.java.naming.security.principal=cn\=Manager,dc\=hostname,dc\=domainname,dc\=com
# The password for the default principal (only used for LDAP sync)
ldap.synchronization.java.naming.security.credentials=<obscured SSHA password>
Note that the obscured password does indeed match the SSHA password defined in my slapd.conf file.
05:02:16,860 ERROR [org.alfresco.repo.security.sync.ChainingUserRegistrySynchronizer] Synchronization aborted due to error
org.alfresco.repo.security.authentication.AuthenticationException: 04130000 LDAP authentication failed.
at org.alfresco.repo.security.authentication.ldap.LDAPInitialDirContextFactoryImpl.buildInitialDirContext(LDAPInitialDirContextFactoryImpl.java:114)
at org.alfresco.repo.security.authentication.ldap.LDAPInitialDirContextFactoryImpl.getDefaultIntialDirContext(LDAPInitialDirContextFactoryImpl.java:89)
at org.alfresco.repo.security.authentication.ldap.LDAPInitialDirContextFactoryImpl.getDefaultIntialDirContext(LDAPInitialDirContextFactoryImpl.java:82)
at org.alfresco.repo.security.sync.ldap.LDAPUserRegistry$3.<init>(LDAPUserRegistry.java:670)
at org.alfresco.repo.security.sync.ldap.LDAPUserRegistry.getGroups(LDAPUserRegistry.java:667)
at org.alfresco.repo.security.sync.ChainingUserRegistrySynchronizer.syncWithPlugin(ChainingUserRegistrySynchronizer.java:618)
at org.alfresco.repo.security.sync.ChainingUserRegistrySynchronizer.synchronize(ChainingUserRegistrySynchronizer.java:434)
at org.alfresco.repo.security.sync.ChainingUserRegistrySynchronizer$6.doWork(ChainingUserRegistrySynchronizer.java:1529)
at org.alfresco.repo.security.authentication.AuthenticationUtil.runAs(AuthenticationUtil.java:508)
at org.alfresco.repo.security.sync.ChainingUserRegistrySynchronizer.onBootstrap(ChainingUserRegistrySynchronizer.java:1523)
at org.springframework.extensions.surf.util.AbstractLifecycleBean.onApplicationEvent(AbstractLifecycleBean.java:56)
at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:97)
at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:294)
…
Caused by: javax.naming.AuthenticationException: [LDAP: error code 49 - Invalid Credentials]
at com.sun.jndi.ldap.LdapCtx.mapErrorCode(LdapCtx.java:3041)
at com.sun.jndi.ldap.LdapCtx.processReturnCode(LdapCtx.java:2987)
at com.sun.jndi.ldap.LdapCtx.processReturnCode(LdapCtx.java:2789)
at com.sun.jndi.ldap.LdapCtx.connect(LdapCtx.java:2703)
at com.sun.jndi.ldap.LdapCtx.<init>(LdapCtx.java:293)
at com.sun.jndi.ldap.LdapCtxFactory.getUsingURL(LdapCtxFactory.java:175)
at com.sun.jndi.ldap.LdapCtxFactory.getUsingURLs(LdapCtxFactory.java:193)
at com.sun.jndi.ldap.LdapCtxFactory.getLdapCtxInstance(LdapCtxFactory.java:136)
at com.sun.jndi.ldap.LdapCtxFactory.getInitialContext(LdapCtxFactory.java:66)
at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:667)
at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:288)
at javax.naming.InitialContext.init(InitialContext.java:223)
at javax.naming.InitialContext.<init>(InitialContext.java:197)
at javax.naming.directory.InitialDirContext.<init>(InitialDirContext.java:82)
at org.alfresco.repo.security.authentication.ldap.LDAPInitialDirContextFactoryImpl.buildInitialDirContext(LDAPInitialDirContextFactoryImpl.java:109)
… 50 more
05:02:16,880 WARN [org.alfresco.repo.security.sync.ChainingUserRegistrySynchronizer] Failed initial synchronize with user registries
org.alfresco.repo.security.authentication.AuthenticationException: 04130000 LDAP authentication failed.
To my untrained eye it doesn't look like anything is amiss, yet it won't authenticate, and therefore won't let anyone into Alfresco. The one thing I question is the line "ldap.synchronization.java.naming.security.principal" line: Do those equal signs need to be escaped in that manner?05-15-2011 06:20 PM
21:50:28,268 ERROR [org.springframework.extensions.webscripts.AbstractRuntime] Exception from executeScript - redirecting to status template error: 04150001 Login failed
org.springframework.extensions.webscripts.WebScriptException: 04150001 Login failed
at org.alfresco.repo.web.scripts.bean.AbstractLoginBean.login(AbstractLoginBean.java:75)
I tried several user names with several "known good" passwords, and they all failed.
ldap.authentication.userNameFormat=cn=%s,dc=machine,dc=company,dc=com
I found that regular users need to include "ou=Users," to get authenticated by "ldapsearch", for instance, so I modified the string to:
ldap.authentication.userNameFormat=cn=%s,ou=Users,dc=machine,dc=company,dc=com
I also tried removing the escapes from the Principal definition:
from
ldap.synchronization.java.naming.security.principal=cn\=Manager,dc\=machine,dc\=company,dc\=com
to
ldap.synchronization.java.naming.security.principal=cn=Manager,dc=machine,dc=company,dc=com
To clarify: The Manager CN can log in with the indicated DN, while users must specify the "ou=Users" piece.05-16-2011 05:11 AM
05-16-2011 10:49 AM
You shouldn't be hacking files below WEB-INF.Thanks, but that's not real helpful.
06-02-2011 09:51 AM
Hi,
In /opt/alfresco/tomcat/webapps/alfresco/WEB-INF/classes/alfresco/repository.properties I have set:In /opt/alfresco/tomcat/webapps/alfresco/WEB-INF/classes/alfresco/subsystems/Authentication/ldap/ldap-authentication.properties
# The default authentication chain
authentication.chain=alfrescoNtlm1:alfrescoNtlm,ldap1:ldap
– Sam
Tags
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.