LDAP users show as sid and not user name

I am using ldap users from ad for authentication in Nextcloud which works be when looking at the users or searching for users to share with the lookup finds users by name but shows their sid and not the name.

What did I do wrong?

Thanks
Ian…

You should check your Expert Seetings of LDAP.

In all attributes check if it works with “cn”.

After that you could try to reset the user and group mapping. Same Register! But be careful with the Reset!

First try only to set the attrib as “cn” (nothing else without the taggs!!)

Hi That sems to have fixed it for new users, Thanks.

Is there a way to get the existng users to show the accont name and not the sid without clearing the mapping and removing the users?

Thanks

Ian…

I suggest No.

It might need a “fresh” beginning.

But have a look at your server files …

I your data dir you should see all new and all old folders and files from your user accounts.
Save everything (!!!) - then reset all accounts. When every user loged in first time a new folder should be created with its user-/nickname!

Copy over the existing old files to your new user account folder on the server. Watch out for correct user access rights of all folders and files!

That should bring all things back to your user accounts - then with their real names :slight_smile:

I know this is a bit of a necro, but we ran into this with AD authentication in v15 and 16, and the fix was, as chrissi55 suggested, to use expert mode. Rather than using cn as the value, we selected sAMAccountName. This matched user names exactly to AD.

We also cleared the mapping and that brought all users in-line with the new settings.

I see the same issue. I am using plain LDAP rather than AD. I tried changing the “Internal Username” setting to cn and clicking on the “Clear Username LDAP Mapping” button. However, while this improves the situation, it isn’t quite right. To test this I created a user with the uid testuser. Their first name is “Test” and last name “User”. When i use cn instead of a random string of numbers and letters as the user name shown in the users list I get Test_User instead of testuser.

I can however log in to the account using the correct username testuser.

Can anyone suggest the correct thing to put here so it actually shows the correct username in the list of users?

I am resurrecting the old post as it is better to keep the information in one place

To answer my own question, the solution in my case was to put uid in Internal Username Attribute and also in the “Override UUID detection section” change the “UUID Attribute for Users” to also be uid. Use at your own risk I’m a novice at LDAP. I don’t know if I actually needed it in the Internal Username Attribute or not, but I’m leaving it like that.

Although it says “Changes will have effect only on newly mapped (added) LDAP users and groups.” I clicked on the “Clear User Name” button and the correct name was now used for my test user.