Hello everyone, i successfully synchronized LDAP users with Alfresco, however im having issues with the groups
here is my global properties file
############################### ## Common Alfresco Properties # ############################### dir.root=C:/ALFRES~1/alf_data alfresco.context=alfresco alfresco.host=127.0.0.1 alfresco.port=8080 alfresco.protocol=http share.context=share share.host=127.0.0.1 share.port=8080 share.protocol=http ### database connection properties ### db.driver=org.postgresql.Driver db.username=alfresco db.password=admin db.name=alfresco db.url=jdbc:postgresql://localhost:5432/${db.name} # Note: your database must also be able to accept at least this many connections. Please see your database documentation for instructions on how to configure this. db.pool.max=275 db.pool.validate.query=SELECT 1 # The server mode. Set value here # UNKNOWN | TEST | BACKUP | PRODUCTION system.serverMode=UNKNOWN ### FTP Server Configuration ### ftp.port=21 ### RMI registry port for JMX ### alfresco.rmi.services.port=50500 ### External executable locations ### ooo.exe=C:/ALFRES~1/LIBREO~1/App/libreoffice/program/soffice.exe ooo.enabled=true ooo.port=8100 img.root=C:\\alfresco-community\\imagemagick img.coders=${img.root}\\modules\\coders img.config=${img.root} img.exe=${img.root}\\convert.exe alfresco-pdf-renderer.root=C:\\alfresco-community\\alfresco-pdf-renderer alfresco-pdf-renderer.exe=${alfresco-pdf-renderer.root}\\alfresco-pdf-renderer.exe jodconverter.enabled=false jodconverter.officeHome=C:/ALFRES~1/LIBREO~1/App/libreoffice jodconverter.portNumbers=8100 ### Initial admin password ### alfresco_user_store.adminpassword=209c6174da490caeb422f3fa5a7ae634 ### E-mail site invitation setting ### notification.email.siteinvite=false ### License location ### dir.license.external=C:/ALFRES~1 ### Solr indexing ### index.subsystem.name=solr4 dir.keystore=${dir.root}/keystore solr.host=localhost solr.port.ssl=8443 ### Allow extended ResultSet processing security.anyDenyDenies=false ### Smart Folders Config Properties ### smart.folders.enabled=false ### Remote JMX (Default: disabled) ### alfresco.jmx.connector.enabled=false ### LDAP : Authentication ### authentication.chain= ldap1:ldap,alfrescoNtlm1:alfrescoNtlm synchronization.syncOnStartup=true
this is the ldap-authentication.properties file
# 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,o=XteUsers,dc=xtensus,dc=doc # 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://localhost:389 #Custom Socket Factory. #ldap.java.naming.ldap.factory.socket=org.alfresco.repo.security.authentication.ldap.AlfrescoLdapSSLSocketFactory # The authentication mechanism to use for password validation 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=admin # Enable FTP authentication using LDAP ldap.authentication.authenticateFTP=true # 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 authentication mechanism to use for synchronization ldap.synchronization.java.naming.security.authentication=simple # The default principal to use (only used for LDAP sync) ldap.synchronization.java.naming.security.principal=cn=admin,dc=xtensus,dc=com # The password for the default principal (only used for LDAP sync) ldap.synchronization.java.naming.security.credentials=ikhlass # 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=0 # If positive, this property indicates that range retrieval should be used to fetch # multi-valued attributes (such as member) in batches of the specified size. # Overcomes any size limits imposed by Active Directory. ldap.synchronization.attributeBatchSize=0 # 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\=inetOrgPerson) # The query to select objects that represent the users to import that have changed since a certain time. ldap.synchronization.personDifferentialQuery=(&(objectclass\=inetOrgPerson)(!(modifyTimestamp<\={0}))) # The group search base restricts the LDAP group query to a sub section of tree on the LDAP server. ldap.synchronization.groupSearchBase=cn\=Groupe BOC,o\=XteGroups,dc\=xtensus,dc\=com # The user search base restricts the LDAP user query to a sub section of tree on the LDAP server. ldap.synchronization.userSearchBase=o\=XteUsers,dc\=xtensus,dc\=com # 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=largeHomeFolderProvider # The attribute on LDAP group objects to map to the authority name property in Alfresco ldap.synchronization.groupIdAttributeName=cn # The attribute on LDAP group objects to map to the authority display name property in Alfresco ldap.synchronization.groupDisplayNameAttributeName=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 # Requests timeout, in miliseconds, use 0 for none (default) ldap.authentication.java.naming.read.timeout=0 # Referrals processing, can be: ignore, follow, throw ldap.authentication.java.naming.referral=follow # LDAPS truststore configuration properties #ldap.authentication.truststore.path= #ldap.authentication.truststore.passphrase= #ldap.authentication.truststore.type= # Set to 'ssl' to enable truststore configuration via subsystem's properties #ldap.authentication.java.naming.security.protocol=ssl # Enable/disable connection pooling for synchronization # For more information about connection pooling please refer to http://docs.oracle.com/javase/jndi/tutorial/ldap/connect/pool.html. # For more information about pool configuration please refer to http://docs.oracle.com/javase/jndi/tutorial/ldap/connect/config.html. ldap.synchronization.com.sun.jndi.ldap.connect.pool=true # A list of space-separated authentication types of connections that may be pooled. Valid types are "none", "simple", and "DIGEST-MD5". ldap.pooling.com.sun.jndi.ldap.connect.pool.authentication=none simple # A string that indicates the level of debug output to produce. Valid values are "fine" (trace connection creation and removal) and "all" (all debugging information). ldap.pooling.com.sun.jndi.ldap.connect.pool.debug= # The string representation of an integer that represents the number of connections per connection identity to create when initially creating a connection for the identity. ldap.pooling.com.sun.jndi.ldap.connect.pool.initsize=1 # The string representation of an integer that represents the maximum number of connections per connection identity that can be maintained concurrently. # Empty value means no maximum size. ldap.pooling.com.sun.jndi.ldap.connect.pool.maxsize= # The string representation of an integer that represents the preferred number of connections per connection identity that should be maintained concurrently. # Empty value means no preferred size. ldap.pooling.com.sun.jndi.ldap.connect.pool.prefsize= # A list of space-separated protocol types of connections that may be pooled. Valid types are "plain" and "ssl". ldap.pooling.com.sun.jndi.ldap.connect.pool.protocol=plain # The string representation of an integer that represents the number of milliseconds that an idle connection may remain in the pool without being closed and removed from the pool. # Empty value means no timeout, connection stays in pool forever. Bad connections are automatically detected and removed from the pool by the LDAP provider ldap.pooling.com.sun.jndi.ldap.connect.pool.timeout= # The string representation of an integer that represents the number of milliseconds to specify how long to wait for a pooled connection. # Empty value means the application will wait indefinitely. ldap.pooling.com.sun.jndi.ldap.connect.timeout= # Enabled/disabled status - there is no standard way to check for this; # "nsAccountLock" is used by most NDS derived directory systems (Oracle / Red Hat / 389 DS); # For OpenLDAP you may want to specify "pwdAccountLockedTime" instead ldap.synchronization.userAccountStatusProperty=nsAccountLock # Expected value for disabled account; # For NDS directory servers: nsAccountLock=true # For OpenLDAP: pwdAccountLockedTime=000001010000Z ldap.synchronization.disabledAccountPropertyValue=true # Some directory servers may not send a status value at all if account is enabled ldap.synchronization.disabledAccountPropertyValueCanBeNull=true # The Account Status Interpreter bean name ldap.synchronization.userAccountStatusInterpreter=ldapUserAccountStatusInterpreter synchronization.syncOnStartup=true
this the my LDAP directory entries
this are my logs
2020-06-23 12:10:31,197 INFO [org.alfresco.repo.management.subsystems.ChildApplicationContextFactory] [localhost-startStop-1] Starting 'Synchronization' subsystem, ID: [Synchronization, default] 2020-06-23 12:10:31,349 INFO [org.alfresco.repo.security.sync.ChainingUserRegistrySynchronizer] [localhost-startStop-1] Synchronizing users and groups with user registry 'ldap1' 2020-06-23 12:10:31,392 INFO [org.alfresco.repo.security.sync.ChainingUserRegistrySynchronizer] [localhost-startStop-1] Retrieving all groups from user registry 'ldap1' 2020-06-23 12:10:31,454 INFO [org.alfresco.repo.security.sync.ChainingUserRegistrySynchronizer] [localhost-startStop-1] Synchronization,Category=directory,id1=ldap1,id2=1 Group Analysis: Commencing batch of 0 entries 2020-06-23 12:10:31,455 INFO [org.alfresco.repo.security.sync.ChainingUserRegistrySynchronizer] [localhost-startStop-1] Synchronization,Category=directory,id1=ldap1,id2=1 Group Analysis: Completed batch of 0 entries 2020-06-23 12:10:31,457 INFO [org.alfresco.repo.security.sync.ChainingUserRegistrySynchronizer] [localhost-startStop-1] Retrieving all users from user registry 'ldap1' 2020-06-23 12:10:31,530 INFO [org.alfresco.repo.security.sync.ChainingUserRegistrySynchronizer] [localhost-startStop-1] Synchronization,Category=directory,id1=ldap1,id2=6 User Creation and Association: Commencing batch of 27 entries 2020-06-23 12:10:34,981 INFO [org.alfresco.repo.security.sync.ChainingUserRegistrySynchronizer] [localhost-startStop-1] Synchronization,Category=directory,id1=ldap1,id2=6 User Creation and Association: Processed 27 entries out of 27. 100 % complete. Rate: 7 per second. 0 failures detected. 2020-06-23 12:10:34,981 INFO [org.alfresco.repo.security.sync.ChainingUserRegistrySynchronizer] [localhost-startStop-1] Synchronization,Category=directory,id1=ldap1,id2=6 User Creation and Association: Completed batch of 27 entries 2020-06-23 12:10:35,006 INFO [org.alfresco.repo.security.sync.ChainingUserRegistrySynchronizer] [localhost-startStop-1] Finished synchronizing users and groups with user registry 'ldap1' 2020-06-23 12:10:35,007 INFO [org.alfresco.repo.security.sync.ChainingUserRegistrySynchronizer] [localhost-startStop-1] 27 utilisateur(s) et 0 groupe(s) traité(s)
Solved! Go to Solution.
Hey guys i found the solution, i just had to change the object class value to its equivelant in LDAP which is the following
# The query to select all objects that represent the groups to import. ldap.synchronization.groupQuery=(objectclass\=posixGroup)
and i change the group query so that it takes all the groups instead of one in my previous config
# The group search base restricts the LDAP group query to a sub section of tree on the LDAP server. ldap.synchronization.groupSearchBase=o=XteGroups,dc=xtensus,dc=com
all the changes are made in the ldap-authentication.properties file.
Hey guys i found the solution, i just had to change the object class value to its equivelant in LDAP which is the following
# The query to select all objects that represent the groups to import. ldap.synchronization.groupQuery=(objectclass\=posixGroup)
and i change the group query so that it takes all the groups instead of one in my previous config
# The group search base restricts the LDAP group query to a sub section of tree on the LDAP server. ldap.synchronization.groupSearchBase=o=XteGroups,dc=xtensus,dc=com
all the changes are made in the ldap-authentication.properties file.
Hi @motazsouid,
Great that you got it sorted - & thanks for updating how you fixed it. That's really helpful to other users.
Cheers,
Ask for and offer help to other Alfresco Content Services Users and members of the Alfresco team.
Related links:
By using this site, you are agreeing to allow us to collect and use cookies as outlined in Alfresco’s Cookie Statement and Terms of Use (and you have a legitimate interest in Alfresco and our products, authorizing us to contact you in such methods). If you are not ok with these terms, please do not use this website.