Change UUID attribute in LDAP setting

Nextcloud version: 11.0.3
Operating system and version: Ubuntu 16.04
Webserver: nginx 1.12.0
PHP version: 7.0.19

I have the usual LDAP config, with random UUIDs as user identifier. Since Collabora (and maybe other apps?) display the UUID instead of the name, it is hard to identify users. Also in the filesystem, I would prefer readable usernames. The uids are unique, so I could use it as a UUID attribute for the users, but I’m not sure how to change it safely. I would need to change stuff in the database and in the filesystem… Has anybody done this already?

$ ./occ ldap:show-config
+-------------------------------+---------------------------------------------------------------+
| Configuration                 |                                                               |
+-------------------------------+---------------------------------------------------------------+
| hasMemberOfFilterSupport      |                                                               |
| hasPagedResultSupport         |                                                               |
| homeFolderNamingRule          |                                                               |
| lastJpegPhotoLookup           | 0                                                             |
| ldapAgentName                 |                                                               |
| ldapAgentPassword             | ***                                                           |
| ldapAttributesForGroupSearch  | cn                                                            |
| ldapAttributesForUserSearch   | uid;givenName;sn;cn                                           |
| ldapBackupHost                | backup                                                        |
| ldapBackupPort                | 389                                                           |
| ldapBase                      | l=*****                                                       |
| ldapBaseGroups                | ou=*****;l=*****                                              |
| ldapBaseUsers                 | ou=*****;l=*****                                              |
| ldapCacheTTL                  | 600                                                           |
| ldapConfigurationActive       | 1                                                             |
| ldapDynamicGroupMemberURL     |                                                               |
| ldapEmailAttribute            | mail                                                          |
| ldapExperiencedAdmin          | 1                                                             |
| ldapExpertUUIDGroupAttr       |                                                               |
| ldapExpertUUIDUserAttr        |                                                               |
| ldapExpertUsernameAttr        |                                                               |
| ldapGroupDisplayName          | cn                                                            |
| ldapGroupFilter               | (objectclass=posixGroup)                                      |
| ldapGroupFilterGroups         |                                                               |
| ldapGroupFilterMode           | 1                                                             |
| ldapGroupFilterObjectclass    | posixGroup                                                    |
| ldapGroupMemberAssocAttr      | memberUid                                                     |
| ldapHost                      | ldap://ldap                                                   |
| ldapIgnoreNamingRules         |                                                               |
| ldapLoginFilter               | (&(uid=%uid)(objectclass=cloudAccount)(allowedServices=*O*))  |
| ldapLoginFilterAttributes     |                                                               |
| ldapLoginFilterEmail          | 0                                                             |
| ldapLoginFilterMode           | 1                                                             |
| ldapLoginFilterUsername       | 1                                                             |
| ldapNestedGroups              | 0                                                             |
| ldapOverrideMainServer        | 0                                                             |
| ldapPagingSize                | 500                                                           |
| ldapPort                      | 389                                                           |
| ldapQuotaAttribute            | owncloudQuota                                                 |
| ldapQuotaDefault              | 10737418240                                                   |
| ldapTLS                       | 0                                                             |
| ldapUserDisplayName           | cn                                                            |
| ldapUserDisplayName2          |                                                               |
| ldapUserFilter                | (&(objectclass=cloudAccount)(allowedServices=*O*))            |
| ldapUserFilterGroups          |                                                               |
| ldapUserFilterMode            | 1                                                             |
| ldapUserFilterObjectclass     | gosaAccount                                                   |
| ldapUuidGroupAttribute        | auto                                                          |
| ldapUuidUserAttribute         | auto                                                          |
| turnOffCertCheck              | 0                                                             |
| turnOnPasswordChange          | 0                                                             |
| useMemberOfToDetectMembership | 1                                                             |
+-------------------------------+---------------------------------------------------------------+

Hi, Jakob42! I am having the same question. Have you ever figured it out?

Sadly no. I’ll have to migrate from openLDAP to an AD soon (and as it seems rather manually/self scripted.) I hope I’ll be able to change that while migrating as well.

OK, good luck!

@jakob42
have you tried it this way ?

Thanks. I have existing users that will break this way, IIRC. But I’ll try again on my test system when I’ll find the time.