cancel
Showing results for 
Search instead for 
Did you mean: 

Alfresco 3.2 LDAP user sync without group sync possible!

_sax
Champ in-the-making
Champ in-the-making
With the newly factored Authentication subsystems I was able to get up CIFS, NTLM and LDAP sync running in almost no time, great work!

Now I'm having one issue with LDAP sync. It works for users, but then tries to import groups, which I don't want it to do.
So I commented the sections in ldap-ad-authentication.properties that belong to groups. I also commented the sections in common-ldap-context.xml, each having the following result:

19:44:19,032 INFO  [org.alfresco.repo.security.sync.ChainingUserRegistrySynchronizer] Creating user 'DonaldDuck'
19:44:19,790 INFO  [org.alfresco.repo.security.sync.ChainingUserRegistrySynchronizer] Retrieving all groups from user registry 'AUTH.EXT.ldap1'
19:44:27,477 ERROR [org.quartz.core.JobRunShell] Job DEFAULT.ldapPeopleJobDetail threw an unhandled Exception:
java.lang.NullPointerException

After the import of persons, it stops with an error message (a null pointer exception, because the blank options point to nowhere).
The problem is, that no user is being displayed in the admin console, and no home folder is created.

With 2.x it was possible to comment the group import trigger and have all users imported, but no groups. Is that possible with 3.2?

With the manual creation of my windows user with password in Alfresco, both NTLM and CIFS are working greatly.
13 REPLIES 13

dward
Champ on-the-rise
Champ on-the-rise
Please include a dump of all your ldap.synchronization.* properties. Note that all of them have changed name since 2.9.

_sax
Champ in-the-making
Champ in-the-making
Thank you for your explanation.

The sync is working fine. I just thought, that the escaping character may have an effect on the user data imported (being not seen as "me").

I actually used ldap-ad-authentication.properties (will leave that alone and reinstall completely, if I proceed with this point).

# 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

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

# 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://172.16.131.15:686 SSL-Port, not used here.
ldap.authentication.java.naming.provider.url=ldap://172.16.131.15:389

# 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=Administrator
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< By the way: This doesn't work for me, if I add my username. Only 'admin' gets the admin panel.

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

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

# 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\=Nogroup)

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

# The query to select all objects that represent the users to import. userAccountControl: bit checks for disabled and non-user accounts
#ldap.synchronization.personQuery=(&(objectclass\=user)(userAccountControl\:1.2.840.113556.1.4.803\:\=512))
ldap.synchronization.personQuery=(&(objectclass=user)(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)(userAccountControl\:1.2.840.113556.1.4.803\:\=512)(!(modifyTimestamp<\={0})))
ldap.synchronization.personDifferentialQuery=(& (objectclass=user)(!(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\=Security Groups,ou\=Alfresco,dc=domain
#ldap.synchronization.groupSearchBase=ou\=Gruppen,ou=\_Global,dc=intra,dc=ads-root,dc=de

# 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=ou=\_Departments,dc=intranet,dc=de

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

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

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

# 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

_sax
Champ in-the-making
Champ in-the-making
I'm really sorry, I misunderstood the meaning of the AlfrescoNtlm subsystem.
I thought, it would not only autosign local users on, but also those that are synced with Alfresco and - during automated login - are authenticated against an LDAP database.
So I had the wrong authentication chain:
AlfrescoNtlm, followed by LDAP sync did sync all users, but none of them was able to sign on because the first subsystem only checked the local user database, containing none of the synced entries. And the latter did not have ldap authentication enabled, only sync.

Now I use authentication.chain=AuthenticationSmiley Tongueassthru,Syncing:ldap-ad and CIFS, NTLM and syncing work like a charm.
In the passthru folder I allowed SSO.

The subsystem configuration made a giant leap with 3.2!

pbkoob
Champ in-the-making
Champ in-the-making
Now I have another issue which is kind of the opposite. I WANT to get my groups but I can't, because whenever there's a little glitch in the LDAP, such as a missing attribute in one of the members of the group, the whole sync goes down. See my thread at http://forums.alfresco.com/en/viewtopic.php?f=9&t=20325 and my bug report at https://issues.alfresco.com/jira/browse/ETHREEOH-2484. If you're interested in a fix, make sure you "vote" on my bug report, so it will get some attention!

There appears to be a suggestion in the the issue on how to fix this.  It requires overriding configurations in swing.  Can anyone explain to me how to do this with clearer detail?