Skip to content

NC 18.02: ldap groups no more visible  #19970

Closed

Description

@resoli

Hello, seems that a regression is present in recent caching code for fetching ldap groups; configuration is ok, but no ldap group is shown in Users view. Replacing

apps/user_ldap/lib/Access.php

with a pre-caching version fixes.

See: https://help.nextcloud.com/t/ldap-groups-found-but-not-showing-up-in-users/73760/4

Activity

  1. added
    0. Needs triagePending check for reproducibility or if it fits our roadmap
    on Mar 15, 2020
  2. kesselb commented on Mar 15, 2020

    @kesselb
    Contributor

    cc @nextcloud/ldap

  3. blizzz commented on Mar 15, 2020

    @blizzz
    Member

    @resoli thanks for the report, but please fill out the issue template, especially the LDAP configuration part.

  4. resoli commented on Mar 16, 2020

    @resoli
    Author

    Steps to reproduce

    1. Install fresh nc 18.0.2
    2. Replicate a working ldap config from another nc
    3. LDAP Groups are missing

    Server configuration

    OS
    Debian Buster

    Web server:
    Apache 2.4 from Debian Buster stock package

    Database:
    Postgresql 11

    PHP version:
    7.3-fpm from stock debian buster package

    Nextcloud version: (see Nextcloud admin page)
    18.0.2

    Updated from an older Nextcloud/ownCloud or fresh install:
    Fresh

    Where did you install Nextcloud from:
    Tgz package from nc download site

    Signing status:

    Signing status No errors have been found.

    List of activated apps:

    App list Enabled: - accessibility: 1.4.0 - activity: 2.11.0 - calendar: 2.0.2 - circles: 0.18.3 - cloud_federation_api: 1.1.0 - comments: 1.8.0 - contacts: 3.2.0 - dav: 1.14.0 - deck: 0.8.0 - documentserver_community: 0.1.5 - federatedfilesharing: 1.8.0 - federation: 1.8.0 - files: 1.13.1 - files_pdfviewer: 1.7.0 - files_rightclick: 0.15.2 - files_sharing: 1.10.1 - files_trashbin: 1.8.0 - files_versions: 1.11.0 - files_videoplayer: 1.7.0 - firstrunwizard: 2.7.0 - logreader: 2.3.0 - lookup_server_connector: 1.6.0 - mail: 1.1.3 - nextcloud_announcements: 1.7.0 - notifications: 2.6.0 - oauth2: 1.6.0 - onlyoffice: 4.1.4 - password_policy: 1.8.0 - photos: 1.0.0 - privacy: 1.2.0 - provisioning_api: 1.8.0 - recommendations: 0.6.0 - serverinfo: 1.8.0 - settings: 1.0.0 - sharebymail: 1.8.0 - spreed: 8.0.5 - support: 1.1.0 - survey_client: 1.6.0 - systemtags: 1.8.0 - tasks: 0.12.1 - text: 2.0.0 - theming: 1.9.0 - twofactor_backupcodes: 1.7.0 - twofactor_totp: 4.1.2 - updatenotification: 1.8.0 - user_ldap: 1.8.0 - viewer: 1.2.0 - workflow_pdf_converter: 1.3.1 - workflowengine: 2.0.0 Disabled: - admin_audit - encryption - files_external

    Nextcloud configuration:

    Config report { "system": { "instanceid": "***REMOVED SENSITIVE VALUE***", "passwordsalt": "***REMOVED SENSITIVE VALUE***", "secret": "***REMOVED SENSITIVE VALUE***", "trusted_domains": [ "nc.comune.trento.it" ], "memcache.local": "\\OC\\Memcache\\Redis", "memcache.locking": "\\OC\\Memcache\\Redis", "redis": { "host": "***REMOVED SENSITIVE VALUE***", "port": 6379 }, "datadirectory": "***REMOVED SENSITIVE VALUE***", "dbtype": "pgsql", "version": "18.0.2.2", "overwrite.cli.url": "https:\/\/nc.comune.trento.it\/", "dbname": "***REMOVED SENSITIVE VALUE***", "dbhost": "***REMOVED SENSITIVE VALUE***", "dbport": "", "dbtableprefix": "oc_", "dbuser": "***REMOVED SENSITIVE VALUE***", "dbpassword": "***REMOVED SENSITIVE VALUE***", "installed": true, "ldapIgnoreNamingRules": false, "ldapProviderFactory": "OCA\\User_LDAP\\LDAPProviderFactory ", "htaccess.RewriteBase": "\/", "maintenance": false, "mail_smtpmode": "smtp", "mail_smtphost": "***REMOVED SENSITIVE VALUE***", "mail_sendmailmode": "smtp", "mail_smtpport": "25" } }

    Are you using external storage, if yes which one:
    no

    Are you using encryption: yes/no
    no

    Are you using an external user-backend, if yes which one: ActiveDirectory

    LDAP configuration (delete this part if not used)

    LDAP config sed 's/\s*//g' config.ldap +-------------------------------+---------------------------------- ------------------------------------------------------------------- ------------------------------------------------------------------- ------------------------------------------------------------------- ---+ |Configuration|s01| +-------------------------------+---------------------------------- ------------------------------------------------------------------- ------------------------------------------------------------------- ------------------------------------------------------------------- ---+ |hasMemberOfFilterSupport|1| |homeFolderNamingRule|| |lastJpegPhotoLookup|0| |ldapAgentName|CN=REDACTED,OU=_Sicurezza,DC=intra,DC=REDACTED,DC =REDACTED,DC=it| |ldapAgentPassword|***| |ldapAttributesForGroupSearch|| |ldapAttributesForUserSearch|| |ldapBackupHost|REDACTED| |ldapBackupPort|3268| |ldapBase|DC=intra,DC=REDACTED,DC=REDACTED,DC=it| |ldapBaseGroups|dc=intra,dc=comune,dc=trento,dc=it| |ldapBaseUsers|dc=intra,dc=REDACTED,dc=REDACTED,dc=it| |ldapCacheTTL|600| |ldapConfigurationActive|1| |ldapDefaultPPolicyDN|| |ldapDynamicGroupMemberURL|| |ldapEmailAttribute|mail| |ldapExperiencedAdmin|0| |ldapExpertUUIDGroupAttr|| |ldapExpertUUIDUserAttr|| |ldapExpertUsernameAttr|| |ldapExtStorageHomeAttribute|| |ldapGidNumber|gidNumber| |ldapGroupDisplayName|cn| |ldapGroupFilter|(&(|(objectclass=group))(|(cn=REDACTED)))| |ldapGroupFilterGroups|REDACTED| |ldapGroupFilterMode|0| |ldapGroupFilterObjectclass|group| |ldapGroupMemberAssocAttr|member| |ldapHost|REDACTED| |ldapIgnoreNamingRules|| |ldapLoginFilter|(&(&(|(objectclass=person)(objectclass=user))(|(|( memberof=CN=REDACTED,OU=CED,OU=REDACTED,DC=in tra,DC=REDACTED,DC=REDACTED,DC=it)(primaryGroupID=9700))))(|(samaccount name=%uid)(|(mailPrimaryAddress=%uid)(mail=%uid))))| |ldapLoginFilterAttributes|| |ldapLoginFilterEmail|1| |ldapLoginFilterMode|0| |ldapLoginFilterUsername|1| |ldapNestedGroups|0| |ldapOverrideMainServer|| |ldapPagingSize|500| |ldapPort|3268| |ldapQuotaAttribute|| |ldapQuotaDefault|| |ldapTLS|0| |ldapUserAvatarRule|default| |ldapUserDisplayName|displayname| |ldapUserDisplayName2|| |ldapUserFilter|(&(|(objectclass=person)(objectclass=user))(|(|(mem berof=CN=REDACTED,OU=CED,OU=REDACTED,DC=intra ,DC=REDACTED,DC=REDACTED,DC=it)(primaryGroupID=9700))))| |ldapUserFilterGroups|REDACTED| |ldapUserFilterMode|0| |ldapUserFilterObjectclass|person;user| |ldapUuidGroupAttribute|auto| |ldapUuidUserAttribute|auto| |turnOffCertCheck|0| |turnOnPasswordChange|0| |useMemberOfToDetectMembership|1| +-------------------------------+---------------------------------- ------------------------------------------------------------------- ------------------------------------------------------------------- ------------------------------------------------------------------- ---+

    Client configuration

    Browser:
    Ffox 73
    Operating system:
    Ubuntu 18.04

  5. scanom commented on Mar 16, 2020

    @scanom

    Same regression on 17.0.4, rolling back Access.php to 17.0.3 version solves the issue.

  6. resoli commented on Mar 17, 2020

    @resoli
    Author

    Same regression on 17.0.4, rolling back Access.php to 17.0.3 version solves the issue.

    I took the same file from master, revision of Dec 5 2019 (sorry, no revision id at hand atm)

  7. Skywalker-11 commented on Mar 19, 2020

    @Skywalker-11
  8. blizzz commented on Mar 19, 2020

    @blizzz
    Member

    @resoli could you post the LDAP config with line breaks, please?

  9. lefty556 commented on Mar 19, 2020

    @lefty556

    I had a similar issue in the 17.0.4 versions, and support set this to fix it up:
    occ ldap:set-config s01 hasMemberOfFilterSupport 0

    s01 was the ldap config ID obtained from occ ldap:show-config

  10. blizzz commented on Mar 19, 2020

    @blizzz
    Member

    @lefty556

    I had a similar issue in the 17.0.4 versions, and support set this to fix it up:
    occ ldap:set-config s01 hasMemberOfFilterSupport 0

    s01 was the ldap config ID obtained from occ ldap:show-config

    cannot reproduce, works either way for me. Could you post your LDAP config and provide your nextcloud.log?

    @resoli additional to the post before, also your log file would be handy.

  11. blizzz commented on Mar 19, 2020

    @blizzz
    Member

    @Skywalker-11 same applies to you ^ :)

  12. 6 remaining items

  13. dea-75 commented on Mar 24, 2020

    @dea-75

    Works for me, thanks, now groups are visible.
    But, if I try to share to a new LDAP group, doesn't work. Share seems activated, but another users in the LDAP group doesn't see the share...
    If I share directory to LDAP user group works fine.

    Is the problem related?

  14. Ninjiner commented on Mar 25, 2020

    @Ninjiner

    If anyone still has that issue, I created a patch you can apply: user_ldap.zip

  15. blizzz commented on Mar 25, 2020

    @blizzz
    Member

    If anyone still has that issue, I created a patch you can apply: user_ldap.zip

    Which version did you create it against?

  16. Ninjiner commented on Mar 25, 2020

    @Ninjiner

    Which version did you create it against?

    Terribly sorry, I forgot to mention that. The patch is for 18.0.3

  17. blizzz commented on Mar 25, 2020

    @blizzz
    Member
  18. Ninjiner commented on Mar 25, 2020

    @Ninjiner

    My patch is based on Skywalker-11's reverting back to 18.0.2 solution because somehow your fix did not work for me.

  19. dea-75 commented on Apr 20, 2020

    @dea-75

    Hmmm seems ldap patch will won't be included in 18.0.4.

    #20456
    #20545

    I'm wrong ?

  20. kesselb commented on Apr 20, 2020

    @kesselb
    Contributor

    I'm wrong ?

    You are.

  21. dea-75 commented on Apr 20, 2020

    @dea-75

    Yes I'm wrong, patch applied !
    Good news !

  22. sgiunchi commented on Jun 30, 2020

    @sgiunchi

    I just installed 19.0.0 on CENTOS8, and I see this problem, LDAP-Groups are not visible.

  23. aquananu commented on Aug 24, 2022

    @aquananu

    hi is this still an issue with nextcloud 24.0.3

    i have membersof group working in nextcloud ldap config page but no groups are being shown in users list page

    can someone please advise what needs to be done to show the group made as cn groupofnames and ou groups in nextcloud.

  24. blizzz commented on Aug 24, 2022

    @blizzz
    Member

    @aquananu you commented on an issue closed for over two year. For help with your configuration you would like to raise your question in the forums: https://help.nextcloud.com

  25. maxxer commented on Dec 9, 2022

    @maxxer

    @aquananu did you file an issue or solve the problem with NC24? thanks

  26. aquananu commented on Dec 14, 2022

    @aquananu

    this was solved by changing group-member association in advanced section of ldap / ad integration settings

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions