cancel
Showing results for 
Search instead for 
Did you mean: 

Alfresco Community 4.2d and Active Directory Synching with Groups

hsturner
Champ on-the-rise
Champ on-the-rise
Our plan is to evaluate Alfresco community in production as proof of concept to determine if it will meet our needs and if we can justify the budget for the additional features of the enterprise edition.

I am having problems getting Alfresco to sync with users in my Active Directory Groups. We have got it working sort of, but it would require us to edit the alfresco-global.properties file each time we add or remove a group and restart the alfresco service. This is not ideal but workable as our plan is to have user access to sites managed by their AD group, not on a user by user basis.

We also have not got SSO and CFIS working yet either, which at this time are both nice to have, but not required items to be working at launch. Any help would be appreciated.

Here is the LDAP portion of our alfresco-global.properties file. Network sensitive information has been hidden.
<blockcode>
### NTLM Passthru ###
authentication.chain=alfrescoNtlm1:alfrescoNtlm,passthru1Smiley Tongueassthru,ldap-ad1:ldap-ad
passthru.authentication.useLocalServer=false
passthru.authentication.servers=dc1\\X.X.X.X,dc2\\X.X.X.X,dc1\\X.X.X.X,dc2\\X.X.X.X,X.X.X.X

ntlm.authentication.sso.enabled=false
alfresco.authentication.allowGuestLogin=false
ntlm.authentication.mapUnknownUserToGuest=false
passthru.authentication.authenticateCIFS=true
passthru.authentication.authenticateFTP=false
passthru.authentication.guestAccess=false
passthru.authentication.defaultAdministratorUserNames=users defined as admins
passthru.authentication.offlineCheckInterval=300

### LDAP-AD ###
#
# LDAP Sync
#
# 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=false
ldap.authentication.java.naming.security.authentication=simple

# 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
ldap.authentication.userNameFormat=%s
ldap.authentication.allowGuestLogin=false
ldap.authentication.java.naming.provider.url=ldap://X.X.X.X:3268

#
synchronization.import.cron=0 0/10 * ? * *

# The default principal to bind with (only used for LDAP sync). This should be a UPN or DN
ldap.synchronization.java.naming.security.principal=CN\=LDAPQuery,CN\=Users,DC\=domain1,DC\=domain2
#ldap.synchronization.java.naming.security.principal=ldapquery@xxxx.xx

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

# 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\=group)(memberOf=cn\=ERP_Alfresco,ou\=Alfresco Groups,ou\=Security Groups,dc\=domain1,dc\=domain2))

# The query to select objects that represent the groups to import that have changed since a certain time.
#ldap.synchronization.groupDifferentialQuery=(&(objectclass\=group)(cn\=ERP_Alfresco,ou\=Security Groups,dc\=domain1,dc\=domain2)(!(modifyTimestamp<\={0})))
ldap.synchronization.groupDifferentialQuery=(&(objectclass\=group)(memberOf=cn\=ERP_Alfresco,ou\=Alfresco Groups,ou\=Security Groups,dc\=domain1,dc\=domain2))


# The query to select all objects that represent the users to import.
#ldap.synchronization.personQuery=(&(objectclass\=user)(memberOf=cn\=Alfresco_ITS,ou\=Alfresco Groups,ou\=Security Groups,dc\=dc\=domain1,dc\=domain2)(userAccountControl\:1.2.840.113556.1.4.803\:\=512))
ldap.synchronization.personQuery=(&(objectclass\=user)(|(memberOf=cn\=Alfresco_ITI,ou\=Alfresco Groups,ou\=Security Groups,dc\=domain1,dc\=domain2) (memberOf=cn\=Alfresco_ITS,ou\=Alfresco Groups,ou\=Security Groups,dc\=domain1,dc\=domain2))(userAccountControl\:1.2.840.113556.1.4.803\:\=512))


# The query to select objects that represent the users to import that have changed since a certain time.
ldap.synchronization.personDifferentialQuery=(&(objectclass\=user)(|(memberOf=cn\=Alfresco_ITI,ou\=Alfresco Groups,ou\=Security Groups,dc\=pblp,dc\=ca)(memberOf=cn\=Alfresco_ITS,ou\=Alfresco Groups,ou\=Security Groups,dc\=domain1,dc\=domain2))(userAccountControl\:1.2.840.113556.1.4.803\:\=512))


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

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

# 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'.0Z'

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

# 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 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=group

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

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

ldap.synchronization.synchronizeChangesOnly=false
</blockcode>
3 REPLIES 3

eswbitto
Confirmed Champ
Confirmed Champ
A little confused…

Are you saying that you can't get any group to sync initially or only when you create a new group in AD? Alfresco automatically does a re-sync at midnight if you haven't changed this setting. Otherwise you can create a cron (if you are using linux).

hsturner
Champ on-the-rise
Champ on-the-rise
The problem we are running into is that the groups sync up for when we add or remove a group in Active Directory, however we are having a problem getting the users in the groups to sync when they are added or removed. Alfresco only seems to be capturing the users that are in the group the first time a group is added.  We have changed the synchronization to occur every 10 minutes for testing purposes, but are going to go with 10 minutes after the hour every 4 hours in production to match our AD updating.

eswbitto
Confirmed Champ
Confirmed Champ
I haven't copied my entire ldap config…I have omitted some settings that are the same as yours. I might still have some still in what I'm posting. (kinda busy at the moment on other stuff) There are a couple of things that I have different.


ldap.authentication.java.naming.security.authentication=simple
ldap.authentication.escapeCommasInBind=false
ldap.authentication.escapeCommasInUid=false
ldap.synchronization.active=true
ldap.synchronization.java.naming.security.authentication=simple
ldap.synchronization.groupQuery=(objectclass\=group)
ldap.synchronization.groupDifferentialQuery=(&(objectclass\=group)(!(whenChanged<\={0})))
ldap.synchronization.personQuery=(&(objectclass\=user)(userAccountControl\:1.2.840.113556.1.4.803\:\=512))
ldap.synchronization.personDifferentialQuery=(&(objectclass\=user)(userAccountControl\:1.2.840.113556.1.4.803\:\=512)(!(whenChanged<\={0})))
ldap.synchronization.modifyTimestampAttributeName=whenChanged
ldap.synchronization.userOrganizationalIdAttributeName=company
ldap.synchronization.defaultHomeFolderProvider=largeHomeFolderProvider
ldap.synchronization.personType=user
ldap.synchronization.groupDisplayNameAttributeName=displayName
ldap.synchronization.groupType=group
ldap.synchronization.groupIdAttributeName=cn
ldap.synchronization.groupMemberAttributeName=member
ldap.synchronization.enableProgressEstimation=true
ldap.authentication.java.naming.read.timeout=0