title: How to synch LDAP users and groups when LDAP does not support Unique Identifier?
body: <p>I import reference to LDAP users and groups to my database.
  Therefore, I need to synch these users and groups periodically.</p>
  
  <p>It is clear for me how to synch these object when LDAP supports Unique Identifier (UID).
  For example Active Directory support <code>objectGUID</code> attribute.</p>
  
  <p>In this case when a user (or group) is moved to other place in LDAP tree and therefore its DN is changed I still can find it using UID and update the user.</p>
  
  <p>What to do when LDAP does not support UID and DN is changed?</p>
  
  <p>If I looking using old DN I can not find a user (or group) and need to remove the user.</p>
  
  <p>But how can I distinguish between use cases when a user is moved to other place in the LDAP tree (its DN is changed) and a user is deleted from LDAP?</p>
  
  <p>When it moved I should find it and update to new DN.
  When it is deleted I need to remove it.</p>
  
  <p>I do not know how to do it.</p>
  
  <p>Can I use the username (login name) for the user synchronization?</p>
  
  <p>What I should use for LDAP group?</p>