cancel
Showing results for 
Search instead for 
Did you mean: 

LDAP-AD sync reports back ok can't search people

r_short
Champ on-the-rise
Champ on-the-rise
Hi there,

We've got an Alfresco 4.2C server set up to sync our active directory users, and it appears to be syncing the users just fine, as shown in the logs below. However even though we're able to log in using our AD user accounts we don't seem to be able to search for the AD users in the People Finder. Is there some really obvious configuration setting I've overlooked somewhere?

Logs of Sync below:

12:29:18,808 INFO  [org.alfresco.repo.security.sync.ChainingUserRegistrySynchronizer] ldap-ad1 Group Analysis: Completed batch of 1 entries
12:29:18,823 INFO  [org.alfresco.repo.security.sync.ChainingUserRegistrySynchronizer] Retrieving users changed since 13-Mar-2013 20:58:27 from user registry 'ldap-ad1'
12:29:18,826 DEBUG [org.alfresco.repo.security.sync.ldap.LDAPUserRegistry] Processing query
12:29:18,826 DEBUG [org.alfresco.repo.security.sync.ldap.LDAPUserRegistry] Search base: dc=domain,dc=local
12:29:18,827 DEBUG [org.alfresco.repo.security.sync.ldap.LDAPUserRegistry]     Return result limit: 0
12:29:18,827 DEBUG [org.alfresco.repo.security.sync.ldap.LDAPUserRegistry]     DerefLink: false
12:29:18,827 DEBUG [org.alfresco.repo.security.sync.ldap.LDAPUserRegistry]     Return named object: false
12:29:18,827 DEBUG [org.alfresco.repo.security.sync.ldap.LDAPUserRegistry]     Time limit for search: 0
12:29:18,827 DEBUG [org.alfresco.repo.security.sync.ldap.LDAPUserRegistry]     Attributes to return: 0 items.
12:30:22,315 INFO  [org.alfresco.repo.security.sync.ChainingUserRegistrySynchronizer] ldap-ad1 User Creation and Association: Commencing batch of 122 entries
12:30:23,328 INFO  [org.alfresco.repo.security.sync.ChainingUserRegistrySynchronizer] ldap-ad1 User Creation and Association: Processed 100 entries out of 122. 82% complete. Rate: 98 per second. 0 failures detected.
12:30:23,441 INFO  [org.alfresco.repo.security.sync.ChainingUserRegistrySynchronizer] ldap-ad1 User Creation and Association: Processed 122 entries out of 122. 100% complete. Rate: 108 per second. 0 failures detected.
12:30:23,441 INFO  [org.alfresco.repo.security.sync.ChainingUserRegistrySynchronizer] ldap-ad1 User Creation and Association: Completed batch of 122 entries
12:30:23,480 INFO  [org.alfresco.repo.security.sync.ChainingUserRegistrySynchronizer] Finished synchronizing users and groups with user registry 'ldap-ad1'
12:30:23,481 INFO  [org.alfresco.repo.security.sync.ChainingUserRegistrySynchronizer] 122 user(s) and 1 group(s) processed
12:30:23,493 INFO  [org.alfresco.repo.management.subsystems.ChildApplicationContextFactory] Startup of 'Synchronization' subsystem, ID: [Synchronization, default] complete


Thanks in advance
6 REPLIES 6

throwback
Champ in-the-making
Champ in-the-making
Can you post your ldap-ad config, minus passwords/sensitive info?

I'm assuming you've changed real details here: "Search base: dc=domain,dc=local" otherwise I would double-check all your user and group search bases in sync config and make sure you have defined correct search bases.

You should also check your user search regexps.


r_short
Champ on-the-rise
Champ on-the-rise
Hi there,

Thanks for the response!


I basically just edited the ldap login details of the template ldap-ad.properties file. It's really strange as I can't find any other posts with the same issue implying it's some mistake I've made, but I'm confident it's syncing the LDAP as the logs say as much.

Is there any way to query the Alfresco users DB like maybe with an ldapsearch?

Just to clarify the domain details and things have been changed.

# 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 taht passed through to LDAP
# In Active Directory, this can either be the user principal name (UPN) or DN.
# UPNs are in the form <sAMAccountName>@domain and are held in the userPrincipalName attribute of a user
ldap.authentication.userNameFormat=%s@domain.local

# 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://ip.addr

# 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=Administrator,other,users

# 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 bind with (only used for LDAP sync). This should be a UPN or DN
ldap.synchronization.java.naming.security.principal=alfresco_user@domain.local

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

# 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

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

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

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

# The query to select all objects that represent the users to import.
ldap.synchronization.personQuery=(&(objectclass\=user)(userAccountControl\:1.2.840.113556.1.4.803\:\=512))
#ldap.synchronization.personQuery=(&(&(objectCategory=user)(userAccountControl=512)))

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

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

# The user search base restricts the LDAP user query to a sub section of tree on the LDAP server.
#ldap.synchronization.userSearchBase=ou\=User Accounts,ou=\Alfresco,dc=domain
ldap.synchronization.userSearchBase=dc\=domain,dc\=local

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

# 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 attribute on person objects in LDAP to map to the organizational id  property in Alfresco
ldap.synchronization.userOrganizationalIdAttributeName=company

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

# 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

# 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

r_short
Champ on-the-rise
Champ on-the-rise
Just discovered that the users are showing up in the admin console they're just not being created in the people section of the site? Is there some seperate step or setting that needs to be performed to make people show up?

ebogaard
Champ on-the-rise
Champ on-the-rise
It looks like there is some problem with 4.2c: initially all new users (created via ldap-sync, invitation or admin-screen) were all 'findable'.
Now it seems that new users aren't shown in the People Finder or when searching for users to add in the Groups-screen in the admin-section.
I can find the users in the admin-Users-screen, though and in Alfresco Explorer interface.

Also: there's another report about this behaviour: http://forums.alfresco.com/forum/end-user-discussions/alfresco-share/user-search-within-share-not-wo...

I can't find this bug in Jira. Can someone confirm or deny that this is a bug?

r_short
Champ on-the-rise
Champ on-the-rise
Hi there,

As an update, I've upgraded the alfresco install to the latest nightly build 4.2.d downloaded on Mar 29th and it appears to have resolved the problem. Still don't know what the cause was, one thing I noticed tho is that in the other forum post you linked it stated they upgraded Alfresco to 4.2.c which is the same as what we did, so it may be something to do with the upgrade process?

Wish I could provide more helpful insight.

Thanks for your assitance though!

anhua-jian
Champ in-the-making
Champ in-the-making
I have upgraded from enterprise version 4.0 to 4.1.3 and got the error saying:

java.net.UnknownHostException: abc.com

When I set the userSearchBase to dc=abc,dc=com, it will raise the issue. But if I change it to ou=xyz,dc=abc,dc=com, it works fine. In my case, dc=abc,dc=com has objectClass domain and domainDNS. I guess in some versions, Alfresco would not allow domain or domainDNS as the userSearchBase/groupSearchBase, because there are too many entries under the domain. Based on this, you might move all users to a single child entry of the domain, or you can create multiple ldap connections for alfresco corresponding to all the entries containing users under the domain.