LDAP user real name

NS system users appear in Nextcloud as a long weird numeric string which is also used in webdav addresses. Isn’t it possible to use the real user name instead? You can’t even distinguish the users from this string. Or is there a workaround so that both can be used, the real name and/or the numeric string?
Thanks for any hints.

The key is the “Internal Username” LDAP paramter. It can be customized but only affects new LDAP users and probably have problems at each nextcloud update within nethserver. For existing usernames a manual replacement on a bunch of tables would be required… and you might lose track of what needs to be changed, so it is mostly viable only on new installations…

A similar (and more severe) warning is given on this post:

Here’s a similar question:

And all the details regarding the names is in the Nextcloud Manual:

Internal Username:

The internal username is the identifier in Nextcloud for LDAP users. By default it will be created from the UUID attribute. The UUID attribute ensures that the username is unique, and that characters do not need to be converted.

The LDAP backend ensures that there are no duplicate internal usernames in Nextcloud, i.e. that it is checking all other activated user backends (including local Nextcloud users). On collisions a random number (between 1000 and 9999) will be attached to the retrieved value.

Here explains why you see the strange name in webdav URL:

The internal username is the default name for the user home folder in Nextcloud. It is also a part of remote URLs, for instance for all *DAV services.

Here tells us it can be changed but with some warnings:

You can override all of this with the Internal Username setting. Leave it empty for default behavior. Changes will affect only newly mapped LDAP users.

When configuring this, be aware that the username in Nextcloud is considered immutable and cannot be changed afterwards. This can cause issues when using an attribute that might change, e.g. the email address of a user that will get changed during name change.

Override UUID detection

By default, Nextcloud auto-detects the UUID attribute. The UUID attribute is used to uniquely identify LDAP users and groups. The internal username will be created based on the UUID, if not specified otherwise.

You can override the setting and pass an attribute of your choice. You must make sure that the attribute of your choice can be fetched for both users and groups and it is unique. Leave it empty for default behavior. Changes will have effect only on newly mapped LDAP users and groups. It also will have effect when a user’s or group’s DN changes and an old UUID was cached, which will result in a new user. Because of this, the setting should be applied before putting Nextcloud in production use and clearing the bindings (see the User and Group Mapping section below).


Oh thanks for the long explanation!
I gonna switch to the real username anyway, since NS is only installed for family use. So the real names will not change.