Skip to content

Instantly share code, notes, and snippets.

@flaf
Last active November 21, 2018 13:11
Show Gist options
  • Save flaf/118bc41d566ae59e78ac267d2758fb4f to your computer and use it in GitHub Desktop.
Save flaf/118bc41d566ae59e78ac267d2758fb4f to your computer and use it in GitHub Desktop.
uid is not used during the LDAP search to set/update the avatar via LDAP

Here is an example of user in database:

MariaDB [owncloud]> select * from oc_ldap_user_mapping where ldap_dn like 'uid=cle-jehan,%' limit 10\G
*************************** 1. row ***************************
       ldap_dn: uid=cle-jehan,ou=personnels en,ou=ac-versailles,ou=education,o=gouv,c=fr
 owncloud_name: 8891ce57-1dd211b2-80000000-00000000
directory_uuid: 8891ce57-1dd211b2-80000000-00000000
1 row in set (0.00 sec)

And here is the LDAP search seen in the log of LDAP server:

[20/Nov/2018:11:43:47 +0100] conn=154634333 op=25 msgId=26 -
    SRCH base="ou=ac-versailles,ou=education,o=gouv,c=fr"
    scope=2 filter="(uid=8891ce57-1dd211b2-80000000-00000000)" ### <===== Instead of uid=cle-jehan?!?
    attrs="dn uid samaccountname memberOf cloudQuotaVrs mail cn  jpegPhoto thumbnailphoto"

Why the uid is not used during the LDAP search?

Test...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment