LDAP users directory changes from user to user_1234

Support intro

Sorry to hear you’re facing problems :slightly_frowning_face:

help.nextcloud.com is for home/non-enterprise users. If you’re running a business, paid support can be accessed via portal.nextcloud.com where we can ensure your business keeps running smoothly.

In order to help you as quickly as possible, before clicking Create Topic please provide as much of the below as you can. Feel free to use a pastebin service for logs, otherwise either indent short log examples with four spaces:


Or for longer, use three backticks above and below the code snippet:


Some or all of the below information will be requested if it isn’t supplied; for fastest response please provide as much as you can :heart:

Nextcloud version (eg, 14.0.6):
Operating system and version (eg, Ubuntu 18.04):
PHP version _(eg, 7.1)20:

The issue you are facing:
When using AD integration, after move user(john) to another OU, their home directory change name from “john” to “john_2889” (random digits). All his personal files remain in the old directory, the new directory is empty. If you return user john to the original OU, he will again get access to his personal files.
In the “Expert settings” of “Integration LDAP/AD” uses:
Internal Username Attribute: sAMAccountName
UUID Attribute for Users: sAMAccountName
How I can change users OU and save all his personal files?

Is this the first time you’ve seen this error? Y:

Steps to replicate it:

  1. Log on with AD user, upload some files, logoff
  2. In AD management console, move user to another OU
  3. Log on with same AD user again. Files from “step 1” not exist.
  4. Retrieve user to original OU. Files from “step 1” exist.