Skip to content

[Bug]: Accessing LDAP configuration UI wipes group mappings #60342

@ReDeViLzGz

Description

@ReDeViLzGz

⚠️ This issue respects the following points: ⚠️

Bug description

When navigating to the LDAP/AD integration settings page in the web UI, all LDAP group associations are lost. In the User Management panel, users appear only in the "Everyone" group, and their original LDAP group memberships disappear.

The only way to recover the group structure is by performing a full database restoration.

Steps to reproduce

  1. Have a functional LDAP integration with the directory server where groups are correctly synced.
  2. Verify that users are correctly assigned to their respective LDAP groups in the Nextcloud "Users" section.
  3. Navigate to Settings -> Administration -> LDAP/AD integration.
  4. Simply view the configuration or switch between the tabs (Users, Groups, Experts).
  5. Check the "Users" management section again.

Expected behavior

The LDAP configuration UI should allow viewing or editing settings without triggering a destructive cleanup of the oc_ldap_group_mapping table or the internal group cache.

Nextcloud Server version

33

Operating system

Debian/Ubuntu

PHP engine version

PHP 8.3

Web server

Apache (supported)

Database engine version

MariaDB

Is this bug present after an update or on a fresh install?

Fresh Nextcloud Server install

Are you using the Nextcloud Server Encryption module?

Encryption is Disabled

What user-backends are you using?

  • Default user-backend (database)
  • LDAP/ Active Directory
  • SSO - SAML
  • Other

Configuration report

{
    "system": {
        "instanceid": "***REMOVED SENSITIVE VALUE***",
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "secret": "***REMOVED SENSITIVE VALUE***",
        "trusted_domains": [
            "nextcloud.domain.com",
        ],
        "datadirectory": "***REMOVED SENSITIVE VALUE***",
        "dbtype": "mysql",
        "version": "33.0.0.16",
        "overwrite.cli.url": "https:\/\/nextcloud.domain.com\/",
        "dbname": "***REMOVED SENSITIVE VALUE***",
        "dbhost": "***REMOVED SENSITIVE VALUE***",
        "dbport": "3306",
        "dbtableprefix": "oc_",
        "mysql.utf8mb4": true,
        "dbuser": "***REMOVED SENSITIVE VALUE***",
        "dbpassword": "***REMOVED SENSITIVE VALUE***",
        "default_phone_region": "ES",
        "installed": true,
        "filelocking.enabled": true,
        "memcache.local": "\\OC\\Memcache\\APCu",
        "memcache.locking": "\\OC\\Memcache\\Redis",
        "redis": {
            "host": "***REMOVED SENSITIVE VALUE***",
            "port": 0,
            "timeout": 1.5,
            "dbindex": 0
        },
        "maintenance": false,
        "ldapIgnoreNamingRules": false,
        "trusted_proxies": "***REMOVED SENSITIVE VALUE***",
        "share_folder": "\/SHARED",
        "twofactor_enforced": "true",
        "twofactor_enforced_groups": [],
        "twofactor_enforced_excluded_groups": [],
        "theme": "",
        "loglevel": 0,
        "logfile": "\/var\/nextcloud\/data\/nextcloud.log",
        "tempdirectory": "\/var\/nextcloud\/data\/tmp",
        "log.condition": {
            "apps": [
                "admin_audit"
            ]
        },
        "trashbin_retention_obligation": "auto, 60",
        "app_install_overwrite": [
            "twofactor_admin"
        ],
        "mail_smtpmode": "smtp",
        "mail_smtpsecure": "ssl",
        "mail_sendmailmode": "smtp",
        "mail_from_address": "***REMOVED SENSITIVE VALUE***",
        "mail_domain": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpauthtype": "LOGIN",
        "mail_smtphost": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpauth": 1,
        "mail_smtpport": "465",
        "mail_smtpname": "***REMOVED SENSITIVE VALUE***",
        "mail_smtppassword": "***REMOVED SENSITIVE VALUE***",
        "files.chunked_upload.max_size": 0,
        "maintenance_window_start": 100,
        "ldapProviderFactory": "OCA\\User_LDAP\\LDAPProviderFactory"
    }
}

List of activated Apps

Enabled:
  - admin_audit: 1.23.0
  - bruteforcesettings: 6.0.0-dev.0
  - circles: 33.0.0
  - cloud_federation_api: 1.17.0
  - comments: 1.23.0
  - contactsinteraction: 1.14.1
  - dav: 1.36.0
  - federatedfilesharing: 1.23.0
  - files: 2.5.0
  - files_automatedtagging: 4.0.0
  - files_downloadlimit: 5.1.0-dev.0
  - files_external: 1.25.1
  - files_lock: 33.0.2
  - files_pdfviewer: 6.0.0-dev.0
  - files_reminders: 1.6.0
  - files_sharing: 1.25.2
  - files_trashbin: 1.23.0
  - files_versions: 1.26.0
  - firstrunwizard: 6.0.0-dev.0
  - group_everyone: 0.1.19
  - impersonate: 4.0.0
  - logreader: 6.0.0
  - lookup_server_connector: 1.21.0
  - nextcloud_announcements: 5.0.0
  - notifications: 6.0.0
  - oauth2: 1.21.0
  - password_policy: 5.0.0-dev.0
  - photos: 6.0.0-dev.0
  - privacy: 5.0.0-dev.0
  - profile: 1.2.0
  - provisioning_api: 1.23.0
  - recommendations: 6.0.0-dev.0
  - related_resources: 4.0.0-dev.0
  - serverinfo: 5.0.0-dev.0
  - settings: 1.16.0
  - sharebymail: 1.23.0
  - support: 5.0.0
  - systemtags: 1.23.0
  - text: 7.0.0-dev.3
  - theming: 2.8.0
  - twofactor_admin: 4.11.1
  - twofactor_backupcodes: 1.22.0
  - twofactor_totp: 15.0.0-dev.0
  - updatenotification: 1.23.0
  - user_ldap: 1.24.0
  - user_status: 1.13.0
  - viewer: 6.0.0-dev.0
  - webhook_listeners: 1.5.0
  - workflowengine: 2.15.0
Disabled:
  - activity: 6.0.0-dev.0 (installed 4.0.0)
  - app_api: 33.0.0 (installed 5.0.2)
  - dashboard: 7.13.0 (installed 7.0.0)
  - encryption: 2.21.0
  - federation: 1.23.0 (installed 1.21.0)
  - ransomware_protection: 1.14.0 (installed 1.14.0)
  - survey_client: 5.0.0-dev.0 (installed 3.0.0)
  - suspicious_login: 11.0.0-dev.0
  - twofactor_nextcloud_notification: 7.0.0
  - weather_status: 1.13.0 (installed 1.0.0)

Nextcloud Signing status

No errors have been found.

Nextcloud Logs

Additional info

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No fields configured for Bug.

    Projects

    Status

    To triage

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions