cancel
Showing results for 
Search instead for 
Did you mean: 

LDAP setting problem

evan
Champ in-the-making
Champ in-the-making
Hi All,
I have a  existing ldap server , i have set the  authentication.chain=alfrescoNtlm1:alfrescoNtlm to authentication.chain=myldap:ldap,alfrescoNtlm1:alfrescoNtlm in "alfresco-global.properties"
my ldap server message is :
Base provider URL: ldap://sample:10389
Base DN: dc=userstore,dc=siteminder
Principle: CN=mytest,OU=Service Accounts,OU=Domain Administration,OU=AM,DC=Userstore,DC=Siteminder
Credential: 12345
now ,i set /opt/Alfresco/tomcat/webapps/alfresco/WEB-INF/classes/alfresco/subsystems/Authentication/ldap/myldap/ldap-authentication.properties  below:

# This flag enables use of this LDAP subsystem for authentication. It may be
# that this subsytem should only be used for synchronization, in which case
# this flag should be set to false.
ldap.authentication.active=true

#
# This properties file brings together the common options for LDAP authentication rather than editing the bean definitions
#
ldap.authentication.allowGuestLogin=true
# How to map the user id entered by the user to that passed through to LDAP
# - simple
#    - this must be a DN and would be something like
#      uid=%s,ou=People,dc=company,dc=com
# - digest
#    - usually pass through what is entered
#      %s
# If not set, an LDAP query involving ldap.synchronization.personQuery and ldap.synchronization.userIdAttributeName will
# be performed to resolve the DN dynamically. This allows directories to be structured and doesn't require the user ID to
# appear in the DN.
ldap.authentication.userNameFormat=uid=%s,ou=Service Accounts,ou=Domain Administration,ou=AM,dc=Userstore,dc=Siteminder

# The LDAP context factory to use
ldap.authentication.java.naming.factory.initial=com.sun.jndi.ldap.LdapCtxFactory

# The URL to connect to the LDAP server
ldap.authentication.java.naming.provider.url=ldap://sample:10389

# The authentication mechanism to use
ldap.authentication.java.naming.security.authentication=simple

# Escape commas entered by the user at bind time
# Useful when using simple authentication and the CN is part of the DN and contains commas
ldap.authentication.escapeCommasInBind=false

# Escape commas entered by the user when setting the authenticated user
# Useful when using simple authentication and the CN is part of the DN and contains commas, and the escaped \, is
# pulled in as part of an LDAP sync
# If this option is set to true it will break the default home folder provider as space names can not contain \
ldap.authentication.escapeCommasInUid=false

# Comma separated list of user names who should be considered administrators by default
ldap.authentication.defaultAdministratorUserNames=evan
# This flag enables use of this LDAP subsystem for user and group
# synchronization. It may be that this subsytem should only be used for
# authentication, in which case this flag should be set to false.
ldap.synchronization.active=true

# The default principal to use (only used for LDAP sync)
ldap.synchronization.java.naming.security.principal=cn=mytest,ou=Service Accounts,ou=Domain Administration,ou=AM,dc=Userstore,dc=Siteminder

# The password for the default principal (only used for LDAP sync)
ldap.synchronization.java.naming.security.credentials=12345

# If positive, this property indicates that RFC 2696 paged results should be
# used to split query results into batches of the specified size. This
# overcomes any size limits imposed by the LDAP server.
ldap.synchronization.queryBatchSize=1000

# The query to select all objects that represent the groups to import.
#ldap.synchronization.groupQuery=(objectclass\=groupOfNames)

# The query to select objects that represent the groups to import that have changed since a certain time.
#ldap.synchronization.groupDifferentialQuery=(&(objectclass\=groupOfNames)(!(modifyTimestamp<\={0})))

# The query to select all objects that represent the users to import.
ldap.synchronization.personQuery=(objectclass\=userProxy)

# The query to select objects that represent the users to import that have changed since a certain time.
ldap.synchronization.personDifferentialQuery=(&(objectclass\=userproxy)(!(modifyTimestamp<\={0})))

# The group search base restricts the LDAP group query to a sub section of tree on the LDAP server.
#ldap.synchronization.groupSearchBase=ou\=Groups,dc\=company,dc\=com

# The user search base restricts the LDAP user query to a sub section of tree on the LDAP server.
ldap.synchronization.userSearchBase=ou\=AP,dc\=userstore,dc\=siteminder

# The name of the operational attribute recording the last update time for a group or user.
ldap.synchronization.modifyTimestampAttributeName=modifyTimestamp

# The timestamp format. Unfortunately, this varies between directory servers.
ldap.synchronization.timestampFormat=yyyyMMddHHmmss'Z'

# The attribute name on people objects found in LDAP to use as the uid in Alfresco
ldap.synchronization.userIdAttributeName=uid

# The attribute on person objects in LDAP to map to the first name property in Alfresco
ldap.synchronization.userFirstNameAttributeName=givenName

# The attribute on person objects in LDAP to map to the last name property in Alfresco
ldap.synchronization.userLastNameAttributeName=sn

# The attribute on person objects in LDAP to map to the email property in Alfresco
ldap.synchronization.userEmailAttributeName=mail

# The attribute on person objects in LDAP to map to the organizational id  property in Alfresco
#ldap.synchronization.userOrganizationalIdAttributeName=o

# The default home folder provider to use for people created via LDAP import
ldap.synchronization.defaultHomeFolderProvider=userHomesHomeFolderProvider

# The attribute on LDAP group objects to map to the gid property in Alfrecso
ldap.synchronization.groupIdAttributeName=cn

# The group type in LDAP
#ldap.synchronization.groupType=groupOfNames

# The person type in LDAP
#ldap.synchronization.personType=inetOrgPerson

# The attribute in LDAP on group objects that defines the DN for its members
#ldap.synchronization.groupMemberAttributeName=member

# If true progress estimation is enabled. When enabled, the user query has to be run twice in order to count entries.
ldap.synchronization.enableProgressEstimation=true


1. I hope to know ,where is wrong in my ldap-authentication.properties 
2. have other properties file need i to set?
3. where and how to set the ldap.synchronization.defaultHomeFolderProvider=userHomesHomeFolderProvider to run?
thanks all.
1 REPLY 1

dward
Champ on-the-rise
Champ on-the-rise
You are not supposed to edit anything under WEB-INF classes. Read http://wiki.alfresco.com/wiki/Alfresco_Subsystems#Configuring_Subsystems

Note that commenting out a property in this WEB-INF file will not disable it - it will break the subsystem as you are removing one of the defaults referenced by the Spring configuration.

Please re-install alfresco.war and do not edit WEB-INF.

If your LDAP server is Active Directory, rather than OpenLDAP, use the "ldap-ad" subsystem rather than the ldap susbsystem

authentication.chain=myldap:ldap-ad,alfrescoNtlm1:alfrescoNtlm

Then try these settings in $TOMCAT_HOME/shared/classes/alfresco/extension/subsystems/ldap-ad/myldap/ldap-authentication.properties

I note that your user class is userProxy rather than user. This suggests that you are using ADAM mode.

http://technet.microsoft.com/en-us/library/cc738377(WS.10).aspx

I'm not sure this is ever going to work? Does userProxy have all the attributes of the user, such as UID and email address?

Your original setting for userNameFormat cannot be right as it does not allow any of the users under userSearchBase. I have left it blank so that the DN gets resolved dynamically using personQuery. Good Luck.

ldap.authentication.userNameFormat=# Intentionally left blank so that dynamic UID -> DN resolution is used
ldap.authentication.java.naming.provider.url=ldap://sample:10389
ldap.authentication.defaultAdministratorUserNames=evan
ldap.synchronization.java.naming.security.principal=cn=mytest,ou=Service Accounts,ou=Domain Administration,ou=AM,dc=Userstore,dc=Siteminder
ldap.synchronization.java.naming.security.credentials=12345
ldap.synchronization.personQuery=(objectclass\=userProxy)
ldap.synchronization.personDifferentialQuery=(&(objectclass\=userproxy)(!(modifyTimestamp<\={0})))
ldap.synchronization.userSearchBase=ou\=AP,dc\=userstore,dc\=siteminder