Repository navigation
Closed
Milestone
Description
Hello,
I'm using LDAP as user source. Now I had to change some users last names und logins because of marrige. But the changes do not get into Nextcloud.
Steps to reproduce
- Change a users last/first name in LDAP
- Log into Netzcloud
- Search for the "new" user in Contacts
Expected behaviour
The user should be displayed with the new values
Actual behaviour
The user is show with his old data. On CLI occ display the new data.
Server configuration
Operating system: Debian 8.10
Web server: Apache
Database: MySQL
PHP version: 5.6.33
Nextcloud version: 13.0.1
Updated from an older Nextcloud/ownCloud or fresh install: Migrated from OC
Where did you install Nextcloud from: tar ball
Signing status:
Signing status
No errors have been found.
List of activated apps:
App list
Enabled: - activity: 2.6.1 - admin_audit: 1.3.0 - admin_notifications: 1.0.1 - announcementcenter: 3.2.1 - audioplayer: 2.2.5 - bruteforcesettings: 1.0.3 - checksum: 0.3.5 - circles: 0.13.6 - comments: 1.3.0 - dav: 1.4.6 - federatedfilesharing: 1.3.1 - files: 1.8.0 - files_accesscontrol: 1.3.0 - files_automatedtagging: 1.3.0 - files_downloadactivity: 1.2.0 - files_pdfviewer: 1.2.1 - files_retention: 1.2.0 - files_sharing: 1.5.0 - files_texteditor: 2.5.1 - files_trashbin: 1.3.0 - files_versions: 1.6.0 - files_videoplayer: 1.2.0 - firstrunwizard: 2.2.1 - gallery: 18.0.0 - groupfolders: 1.2.0 - impersonate: 1.0.3 - logreader: 2.0.0 - lookup_server_connector: 1.1.0 - metadata: 0.6.0 - nextcloud_announcements: 1.2.0 - notifications: 2.1.2 - oauth2: 1.1.0 - password_policy: 1.3.0 - provisioning_api: 1.3.0 - quota_warning: 1.2.0 - richdocuments: 2.0.5 - serverinfo: 1.3.0 - sharebymail: 1.3.0 - spreed: 3.1.0 - survey_client: 1.1.0 - systemtags: 1.3.0 - theming: 1.4.1 - twofactor_backupcodes: 1.2.3 - updatenotification: 1.3.0 - user_ldap: 1.3.1 - workflowengine: 1.3.0 Disabled: - encryption - federation - files_external - user_externalNextcloud configuration:
Config report
"system": { "instanceid": "***REMOVED SENSITIVE VALUE***", "passwordsalt": "***REMOVED SENSITIVE VALUE***", "trusted_domains": [ ***REMOVED SENSITIVE VALUE***", ], "datadirectory": "***REMOVED SENSITIVE VALUE***", "memcache.local": "\\OC\\Memcache\\APCu", "dbtype": "mysql", "version": "13.0.1.1", "dbname": "***REMOVED SENSITIVE VALUE***", "dbhost": "***REMOVED SENSITIVE VALUE***", "dbtableprefix": "oc_", "dbuser": "***REMOVED SENSITIVE VALUE***", "dbpassword": "***REMOVED SENSITIVE VALUE***", "installed": true, "forcessl": true, "mail_from_address": "***REMOVED SENSITIVE VALUE***", "mail_smtpmode": "php", "mail_domain": "***REMOVED SENSITIVE VALUE***", "preview_libreoffice_path": "\/usr\/bin\/libreoffice", "loglevel": 3, "ldapIgnoreNamingRules": false, "ldapUserCleanupInterval": 30, "preview_max_x": 100, "preview_max_y": 100, "theme": "", "secret": "***REMOVED SENSITIVE VALUE***", "maintenance": false, "trashbin_retention_obligation": "auto", "updater.release.channel": "stable", "ldapProviderFactory": "\\OCA\\User_LDAP\\LDAPProviderFactory", "overwrite.cli.url": ***REMOVED SENSITIVE VALUE***", "htaccess.RewriteBase": "\/"Are you using external storage, if yes which one: local/smb/sftp/...
Are you using encryption: no
Are you using an external user-backend, if yes which one: LDAP
Activity
rullzer commentedon Apr 10, 2018
@nextcloud/ldap
blizzz commentedon Apr 10, 2018
There's a cache holding data for 10 minutes (by default). I guess that kicked in. I am not aware of any issues, and saw it also working as expected on a change on our instance just recently.
kroerig commentedon Apr 10, 2018
I edited the user account about 4 days ago und NC still displays the old name in the contact search.
But with the new email and the "talk to" button also shows the new name.
blizzz commentedon Apr 10, 2018
@kroerig then, for some reasons, the local addressbook (where the contactsmenu get its data from) was not updated. Could you provide your Nextcoud log file?
kroerig commentedon Apr 10, 2018
https://archiv.leibniz-remscheid.de/nextcloud.log.bz2 (9.2MB, uncompressed 400MB)
TomGem commentedon Jun 18, 2018
I'm having the same issue.
'Contacts' on the upper right seems to use the table 'oc_cards', which does not get updated if LDAP values change. As marriage is quite common if there are a few thousand accounts, I often have to correct the 'carddata' BLOB in 'oc_cards' manually.
'occ user:info username' on the other hand displays the correct values
TomGem commentedon Jun 28, 2018
Fyi @kroerig, for now you could update Nextcloud users manually.
I wrote a little script to get the current values with ldapsearch and set them with occ if needed.Does not work..
kroerig commentedon Jul 3, 2018
I tried your commands
occ user:setting USERNAME user_ldap displayNamealready shows the right value.
kroerig commentedon Jul 4, 2018
Today I had the next user that had to be renamed. Same problem. Now I'm on NC 13.0.4.
I found the wrong values also in 'oc_cards_properties'. This one seems to be used for seaching of contacts.
Can I clear both tables and have NC populate them again?
TomGem commentedon Jul 6, 2018
You're right, oc_cards does not get updated when changing the displayName.
I'd interested in a way to repopulate oc_cards from ldap too.
only write when the displayname differs, but then announce it
blizzz commentedon Oct 25, 2018
fix in #12054, would be awesome if you could test it
kroerig commentedon Oct 26, 2018
I tested and for me it does not work.
But I'm on 14.0.3 now.
I changed LDAP:displayname and also tried LDAP:givenname and LDAP:sn
NC displays the old values on the users settings page, too.
Is it possible that NC does this changes in the backgroud via cron, too? The problem is that not all users log into NC regulary, but others search for them.
blizzz commentedon Oct 26, 2018
@kroerig you would need to apply the patch, first.
Yes, we switched to update user date from LDAP in a background job (unless the mode is still ajax), apart from first fetch and on logins.
kroerig commentedon Oct 26, 2018
Howto?
blizzz commentedon Oct 26, 2018
@kroerig
diff --git a/apps/user_ldap/tests/User/UserTest.php b/apps/user_ldap/tests/User/UserTest.php(it is a test file and those are not shipped with the releases)patch -p1 < 12054.patch(In case of errors, copy to the backed up file back to its place)
kroerig commentedon Oct 28, 2018
Remove everything **after and including**shure? That would mean an empty fileThat does not work.
I only get
patch: **** Only garbage was found in the patch input.blizzz commentedon Oct 29, 2018
@kroerig you were a bit overeager in trimming it down. Copy that into a file (I added a commit anyhow):
kroerig commentedon Oct 29, 2018
hm, seams that one of my tries work.
patching file apps/user_ldap/lib/User/User.php Reversed (or previously applied) patch detected! Assume -R? [n] Apply anyway? [n] Skipping patch.Got a new marrige announcemet for this weekend. Will try then.
blizzz commentedon Oct 29, 2018
@kroerig best, copy back the backup and apply the new patch. i fixed a corner case inbetween, that probably does not affect you, nevertheless better to have the current code :) and, thanks for testing! :)
Backport of #12054 to stable14
Backport of #12054 to stable13
kroerig commentedon Nov 11, 2018
@blizzz
The displayname was changed but email still shows the old value.
blizzz commentedon Nov 13, 2018
@kroerig email address changes are already done via the core user object and it propagates changes.
Best clue: from a previous state the email was the same as saved as user preference, but the addressbook contained a different value.