Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot sync users from AD #169

Open
ghost opened this issue Mar 14, 2018 · 1 comment
Open

Cannot sync users from AD #169

ghost opened this issue Mar 14, 2018 · 1 comment

Comments

@ghost
Copy link

ghost commented Mar 14, 2018

I've configured the plugin as attached.
piwik1
piwik2

If i try to sync now via he Webinterface or commandline he tells me that he cannot find the users.
piwik3

But if i use it without the --login parameter he will find the other users but will skip them.

Last time i've removed one user from the AD group and added him today again.

If i now change the user id field to mail it works fine.

Is there any offical solution?

Log without login-parameter.

root@cloud:/var/www/piwik# ./console loginldap:synchronize-users -vvv
DEBUG [2018-03-14 14:42:31] UserSynchronizer::makeConfigured(): LDAP access synchronization not enabled.
DEBUG [2018-03-14 14:42:31] UserSynchronizer::makeConfigured: configuring with defaultSitesWithViewAccess = all
DEBUG [2018-03-14 14:42:31] Model\LdapUsers: start getAllUserLogins() with
DEBUG [2018-03-14 14:42:31] Calling ldap_connect('rz-dc01.DOMAIN.de', 389)
DEBUG [2018-03-14 14:42:31] ldap_connect result is [resource]
DEBUG [2018-03-14 14:42:31] anonymous ldap_bind call finished; connection ok
INFO [2018-03-14 14:42:31] LdapUsers::makeLdapClient: Using LDAP server rz-dc01.DOMAIN.de:389
DEBUG [2018-03-14 14:42:31] Calling ldap_bind([resource], 'CN=svc-rz-piwik,OU=Service,OU=User,OU=DOMAIN,DC=DOMAIN,DC=de', <password[length=15]>)
DEBUG [2018-03-14 14:42:31] ldap_bind result is '1'
DEBUG [2018-03-14 14:42:31] Calling ldap_search([resource], 'dc=DOMAIN,dc=de', '(&(objectclass=person)(memberOf=CN=u-gbl-Global-Piwik,OU=Groups,OU=Glob                                              al,OU=System Object,DC=DOMAIN,DC=de))')
DEBUG [2018-03-14 14:42:31] ldap_search result is [resource]
DEBUG [2018-03-14 14:42:31] Calling ldap_get_entries([resource], [resource])
DEBUG [2018-03-14 14:42:31] ldap_get_entries result is not null
DEBUG [2018-03-14 14:42:31] Calling ldap_close([resource])
DEBUG [2018-03-14 14:42:31] ldap_close returned true
DEBUG [2018-03-14 14:42:31] Model\LdapUsers: end getAllUserLogins() with [array]
Synchronizing '[email protected]'...  DEBUG [2018-03-14 14:42:31] Model\LdapUsers: start getUser() with [array]
DEBUG [2018-03-14 14:42:31] Calling ldap_connect('rz-dc01.DOMAIN.de', 389)
DEBUG [2018-03-14 14:42:31] ldap_connect result is [resource]
DEBUG [2018-03-14 14:42:31] anonymous ldap_bind call finished; connection ok
INFO [2018-03-14 14:42:31] LdapUsers::makeLdapClient: Using LDAP server rz-dc01.DOMAIN.de:389
DEBUG [2018-03-14 14:42:31] Calling ldap_bind([resource], 'CN=svc-rz-piwik,OU=Service,OU=User,OU=DOMAIN,DC=DOMAIN,DC=de', <password[length=15]>)
DEBUG [2018-03-14 14:42:31] ldap_bind result is '1'
DEBUG [2018-03-14 14:42:31] Model\LdapUsers::addUsernameSuffix: Adding suffix '@DOMAIN.de' to username '[email protected]'.
DEBUG [2018-03-14 14:42:31] Calling ldap_search([resource], 'dc=DOMAIN,dc=de', '(&(objectclass=person)(memberOf=CN=u-gbl-Global-Piwik,OU=Groups,OU=Glob                                              al,OU=System Object,DC=DOMAIN,DC=de)([email protected]@DOMAIN.de))')
DEBUG [2018-03-14 14:42:31] ldap_search result is [resource]
DEBUG [2018-03-14 14:42:31] Calling ldap_get_entries([resource], [resource])
DEBUG [2018-03-14 14:42:31] ldap_get_entries result is not null
DEBUG [2018-03-14 14:42:31] Calling ldap_close([resource])
DEBUG [2018-03-14 14:42:31] ldap_close returned true
DEBUG [2018-03-14 14:42:31] Model\LdapUsers: end getUser() with null
failed!
Synchronizing '[email protected]'...  DEBUG [2018-03-14 14:42:31] Model\LdapUsers: start getUser() with [array]
DEBUG [2018-03-14 14:42:31] Calling ldap_connect('rz-dc01.DOMAIN.de', 389)
DEBUG [2018-03-14 14:42:31] ldap_connect result is [resource]
DEBUG [2018-03-14 14:42:31] anonymous ldap_bind call finished; connection ok
INFO [2018-03-14 14:42:31] LdapUsers::makeLdapClient: Using LDAP server rz-dc01.DOMAIN.de:389
DEBUG [2018-03-14 14:42:31] Calling ldap_bind([resource], 'CN=svc-rz-piwik,OU=Service,OU=User,OU=DOMAIN,DC=DOMAIN,DC=de', <password[length=15]>)
DEBUG [2018-03-14 14:42:31] ldap_bind result is '1'
DEBUG [2018-03-14 14:42:31] Model\LdapUsers::addUsernameSuffix: Adding suffix '@DOMAIN.de' to username '[email protected]'.
DEBUG [2018-03-14 14:42:31] Calling ldap_search([resource], 'dc=DOMAIN,dc=de', '(&(objectclass=person)(memberOf=CN=u-gbl-Global-Piwik,OU=Groups,OU=Glob                                              al,OU=System Object,DC=DOMAIN,DC=de)([email protected]@DOMAIN.de))')
DEBUG [2018-03-14 14:42:31] ldap_search result is [resource]
DEBUG [2018-03-14 14:42:31] Calling ldap_get_entries([resource], [resource])
DEBUG [2018-03-14 14:42:31] ldap_get_entries result is not null
DEBUG [2018-03-14 14:42:31] Calling ldap_close([resource])
DEBUG [2018-03-14 14:42:31] ldap_close returned true
DEBUG [2018-03-14 14:42:31] Model\LdapUsers: end getUser() with null
failed!
Synchronizing '[email protected]'...  DEBUG [2018-03-14 14:42:31] Model\LdapUsers: start getUser() with [array]
DEBUG [2018-03-14 14:42:31] Calling ldap_connect('rz-dc01.DOMAIN.de', 389)
DEBUG [2018-03-14 14:42:31] ldap_connect result is [resource]
DEBUG [2018-03-14 14:42:31] anonymous ldap_bind call finished; connection ok
INFO [2018-03-14 14:42:31] LdapUsers::makeLdapClient: Using LDAP server rz-dc01.DOMAIN.de:389
DEBUG [2018-03-14 14:42:31] Calling ldap_bind([resource], 'CN=svc-rz-piwik,OU=Service,OU=User,OU=DOMAIN,DC=DOMAIN,DC=de', <password[length=15]>)
DEBUG [2018-03-14 14:42:31] ldap_bind result is '1'
DEBUG [2018-03-14 14:42:31] Model\LdapUsers::addUsernameSuffix: Adding suffix '@DOMAIN.de' to username '[email protected]'.
DEBUG [2018-03-14 14:42:31] Calling ldap_search([resource], 'dc=DOMAIN,dc=de', '(&(objectclass=person)(memberOf=CN=u-gbl-Global-Piwik,OU=Groups,OU=Glob                                              al,OU=System Object,DC=DOMAIN,DC=de)([email protected]@DOMAIN.de))')
DEBUG [2018-03-14 14:42:31] ldap_search result is [resource]
DEBUG [2018-03-14 14:42:31] Calling ldap_get_entries([resource], [resource])
DEBUG [2018-03-14 14:42:31] ldap_get_entries result is not null
DEBUG [2018-03-14 14:42:31] Calling ldap_close([resource])
DEBUG [2018-03-14 14:42:31] ldap_close returned true
DEBUG [2018-03-14 14:42:31] Model\LdapUsers: end getUser() with null
failed!

Synchronized 0 users!

Could not synchronize the following users in LDAP:
[email protected]          User "[email protected]" not found!
[email protected]          User "[email protected]" not found!
[email protected]           User "[email protected]" not found!



@ghost
Copy link

ghost commented Oct 17, 2020

Don't know if it will help you but in my setup, Instead of using "userPrincipalName" user id, I use "sAMAccountName".

My instance is in french but this screenshot may help :

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

0 participants