Help! AD Users have been migrated and owncloud doesnt work as expected

Help, i have 2 LDAP bindings 1 to AD1 and 1 to AD2 and at work they thought it would be a good idea to duplicated the users from from AD1 with the same sAMAccountName to AD2 for migration purposes.

User Home Folder Naming Rule on my owncloud server has always been set to sAMAccountName and users are now being migrated from AD1 to AD2.

Result: Users originally from AD1 can still log into owncloud via AD2 without their original files but as soon as they upload the same files they get “Error, File Exist”. Which is normal behaviour since there are already files in that directory and owncloud doesnt know its the same user for obvious reasons. (right?)

How can i solve this or make a workaround?

I try’d changing the “User Home Folder Naming Rule” to something else like userPrincipalName to make the directory unique but still owncloud recognizes the user somehow and places the same file in the old directory even though it made the new directory. with just a cache directory.

Cool community since no one knows anything about ldap on here, i took the liberty to figure it out myself.

When you change the Home Naming Folder attribute the user cannot access his files anymore since in the database it says the files are there thus showing the files in the owncloud webgui but the location on the disk has changed.

Only solution is to copy the files per user to the new directory so the files are accessible again which is not a scalable solution.

Hey take a look at this, you will probably need to follow this page in the documentation:

And or course, re-sync your users to get the new rule it the accounts table.

I dont see in the link you provided (and which was already known to me) where this would help me.

I need to change the home folder naming of all ldap users and not change the root of the data folder of owncloud.


i think you’re welcome here to contribute to the community and fill the gap for the missing knowledge about LDAP.

1 Like