# Another LDAP problem, I suspect

**URL:** <https://syncloud.discourse.group/t/another-ldap-problem-i-suspect/243>\
**Category:** Access Issues\
**Created:** [29 September 2022 13:06 UTC](https://syncloud.discourse.group/t/another-ldap-problem-i-suspect/243 "2022-09-29T13:06:07Z")\
**Posts on this page:** 17\
**Page:** 1

<div class="post-metadata">

**Author:** ![trevorprinn](https://yyz2.discourse-cdn.com/free1/user_avatar/syncloud.discourse.group/trevorprinn/32/14_2.png) [@trevorprinn](https://syncloud.discourse.group/u/trevorprinn)\
**Post date:** [29 September 2022 13:06 UTC](https://syncloud.discourse.group/t/another-ldap-problem-i-suspect/243/1 "2022-09-29T13:06:07Z")

</div>

I don’t know when it happened, but I’ve just noticed that my nextcloud no longer recognises my account, trevor (which is the admin account) as being in the admin group. I’m not seeing any of the admin items on the menu.

When I click on “Admins” in users I get a popup reading “An error occurred during the request. Unable to proceed.” and the spinning wheel carries on forever. When I click on active users I am shown as being only in one group (one I created for my band) and the only users I can see are those in that group. I know nextcloud is still working for my girlfriend, who isn’t in that group.

I’m assuming it’s something similar to the problem I had with gogs, in that I set it all up a very long time ago and didn’t use a separate admin account, and something has gone wrong in an upgrade.

---

<div class="post-metadata">

**Author:** ![boris](https://avatars.discourse-cdn.com/v4/letter/b/74df32/32.png) [@boris](https://syncloud.discourse.group/u/boris)\
**Post date:** [29 September 2022 17:21 UTC](https://syncloud.discourse.group/t/another-ldap-problem-i-suspect/243/2 "2022-09-29T17:21:59Z")

</div>

Could you run these commands on the device:

```auto
snap run nextcloud.psql -c "select * from oc_ldap_group_mapping"

snap run nextcloud.psql -c "select * from oc_ldap_group_members"

```

---

<div class="post-metadata">

**Author:** ![trevorprinn](https://yyz2.discourse-cdn.com/free1/user_avatar/syncloud.discourse.group/trevorprinn/32/14_2.png) [@trevorprinn](https://syncloud.discourse.group/u/trevorprinn)\
**Post date:** [29 September 2022 17:51 UTC](https://syncloud.discourse.group/t/another-ldap-problem-i-suspect/243/3 "2022-09-29T17:51:22Z")

</div>

```auto
root@odroid-xu3and4:~# snap run nextcloud.psql -c "select * from oc_ldap_group_mapping"
could not change directory to "/root": Permission denied
 owncloud_name | ldap_dn | directory_uuid | ldap_dn_hash
---------------+------------------------------------------+--------------------------------------+------------------------------------------------------------------
 admin | cn=syncloud,ou=groups,dc=syncloud,dc=org | 2da7425f-c5ec-4f68-a086-85e0ce643681 | aac22646179b2b187a05c325be3431b95e39ef12a19def4ad4ea2e3aa0dc5123
(1 row)

root@odroid-xu3and4:~# snap run nextcloud.psql -c "select * from oc_ldap_group_members"
could not change directory to "/root": Permission denied
 owncloudname | owncloudusers
--------------+-------------------------
 admin | a:1:{i:0;s:6:"trevor";}
(1 row)

```

---

<div class="post-metadata">

**Author:** ![boris](https://avatars.discourse-cdn.com/v4/letter/b/74df32/32.png) [@boris](https://syncloud.discourse.group/u/boris)\
**Post date:** [29 September 2022 19:46 UTC](https://syncloud.discourse.group/t/another-ldap-problem-i-suspect/243/4 "2022-09-29T19:46:20Z")

</div>

looks good actually.  
what about this:

```auto
snap run nextcloud.occ group:list

```

---

<div class="post-metadata">

**Author:** ![trevorprinn](https://yyz2.discourse-cdn.com/free1/user_avatar/syncloud.discourse.group/trevorprinn/32/14_2.png) [@trevorprinn](https://syncloud.discourse.group/u/trevorprinn)\
**Post date:** [29 September 2022 20:11 UTC](https://syncloud.discourse.group/t/another-ldap-problem-i-suspect/243/5 "2022-09-29T20:11:33Z")

</div>

```auto
root@odroid-xu3and4:~# snap run nextcloud.occ group:list
  - abtuse:
    - alex
    - andrei
    - brian
    - cameron
    - graham
    - hyo
    - joshua
    - kuba
    - nathalia
    - rebecca
    - ruben
    - trevor
  - admin:
    - trevor

```

That’s a bit weird. It says I am in the admin group (which I should be, of course, but the web ui says I’m not).

---

<div class="post-metadata">

**Author:** ![boris](https://avatars.discourse-cdn.com/v4/letter/b/74df32/32.png) [@boris](https://syncloud.discourse.group/u/boris)\
**Post date:** [29 September 2022 20:28 UTC](https://syncloud.discourse.group/t/another-ldap-problem-i-suspect/243/6 "2022-09-29T20:28:19Z")

</div>

Ah, you are in both groups somehow

---

<div class="post-metadata">

**Author:** ![boris](https://avatars.discourse-cdn.com/v4/letter/b/74df32/32.png) [@boris](https://syncloud.discourse.group/u/boris)\
**Post date:** [29 September 2022 20:29 UTC](https://syncloud.discourse.group/t/another-ldap-problem-i-suspect/243/7 "2022-09-29T20:29:58Z")

</div>

You can try this

```auto
snap run nextcloud.occ group:removeuser abtuse trevor

```

---

<div class="post-metadata">

**Author:** ![trevorprinn](https://yyz2.discourse-cdn.com/free1/user_avatar/syncloud.discourse.group/trevorprinn/32/14_2.png) [@trevorprinn](https://syncloud.discourse.group/u/trevorprinn)\
**Post date:** [29 September 2022 20:59 UTC](https://syncloud.discourse.group/t/another-ldap-problem-i-suspect/243/8 "2022-09-29T20:59:52Z")

</div>

The only change that makes that I can see is that I no longer appear in the active users list at all (in the ui). Apart from that, everything seems to be the same.

I’ve tried rebooting the server since, as well.

---

<div class="post-metadata">

**Author:** ![boris](https://avatars.discourse-cdn.com/v4/letter/b/74df32/32.png) [@boris](https://syncloud.discourse.group/u/boris)\
**Post date:** [29 September 2022 21:04 UTC](https://syncloud.discourse.group/t/another-ldap-problem-i-suspect/243/9 "2022-09-29T21:04:35Z")

</div>

Did you try to remove yourself from abtuse group?

---

<div class="post-metadata">

**Author:** ![trevorprinn](https://yyz2.discourse-cdn.com/free1/user_avatar/syncloud.discourse.group/trevorprinn/32/14_2.png) [@trevorprinn](https://syncloud.discourse.group/u/trevorprinn)\
**Post date:** [29 September 2022 21:06 UTC](https://syncloud.discourse.group/t/another-ldap-problem-i-suspect/243/10 "2022-09-29T21:06:50Z")

</div>

Yes. That’s after running the

```auto
snap run nextcloud.occ group:removeuser abtuse trevor

```

command.

The Active Users list is showing only the members of the abtuse group. Not people who aren’t in any groups.

---

<div class="post-metadata">

**Author:** ![boris](https://avatars.discourse-cdn.com/v4/letter/b/74df32/32.png) [@boris](https://syncloud.discourse.group/u/boris)\
**Post date:** [30 September 2022 05:58 UTC](https://syncloud.discourse.group/t/another-ldap-problem-i-suspect/243/11 "2022-09-30T05:58:12Z")

</div>

Can you send a screenshot of the menu ?

 ![IMG_20220930_065518](https://global.discourse-cdn.com/free1/uploads/syncloud/original/1X/d0d61df7e923ec1ef5f1c16bed3e6e7740b13858.jpeg)

---

<div class="post-metadata">

**Author:** ![trevorprinn](https://yyz2.discourse-cdn.com/free1/user_avatar/syncloud.discourse.group/trevorprinn/32/14_2.png) [@trevorprinn](https://syncloud.discourse.group/u/trevorprinn)\
**Post date:** [30 September 2022 10:40 UTC](https://syncloud.discourse.group/t/another-ldap-problem-i-suspect/243/12 "2022-09-30T10:40:06Z")

</div>

![Clip](https://global.discourse-cdn.com/free1/uploads/syncloud/original/1X/6968be5d3496b60da7711caf08a84472b09e0199.jpeg)

---

<div class="post-metadata">

**Author:** ![boris](https://avatars.discourse-cdn.com/v4/letter/b/74df32/32.png) [@boris](https://syncloud.discourse.group/u/boris)\
**Post date:** [1 October 2022 07:08 UTC](https://syncloud.discourse.group/t/another-ldap-problem-i-suspect/243/13 "2022-10-01T07:08:59Z")

</div>

Do you have all updates applied in Settings - Updates?  
Latest version of Nextcloud installed?  
How did you add users using Users app or directly to Nextcloud?

---

<div class="post-metadata">

**Author:** ![trevorprinn](https://yyz2.discourse-cdn.com/free1/user_avatar/syncloud.discourse.group/trevorprinn/32/14_2.png) [@trevorprinn](https://syncloud.discourse.group/u/trevorprinn)\
**Post date:** [1 October 2022 10:45 UTC](https://syncloud.discourse.group/t/another-ldap-problem-i-suspect/243/14 "2022-10-01T10:45:25Z")

</div>

System is version 1481, installer is 312. Nextcloud is 603. Users is 244. As far as I know everything is at the latest version.

trevor is the admin account and was created when I first installed syncloud. There’s one other account, danny, created in users. The rest were all created in Nextcloud.

---

<div class="post-metadata">

**Author:** ![boris](https://avatars.discourse-cdn.com/v4/letter/b/74df32/32.png) [@boris](https://syncloud.discourse.group/u/boris)\
**Post date:** [1 October 2022 12:27 UTC](https://syncloud.discourse.group/t/another-ldap-problem-i-suspect/243/15 "2022-10-01T12:27:52Z")

</div>

Just to make sure, do you not see Administration settings?

 ![IMG_20221001_132344](https://global.discourse-cdn.com/free1/uploads/syncloud/original/1X/eb54a739775dce3891d19bd7910a51e97a46b213.jpeg)

---

<div class="post-metadata">

**Author:** ![trevorprinn](https://yyz2.discourse-cdn.com/free1/user_avatar/syncloud.discourse.group/trevorprinn/32/14_2.png) [@trevorprinn](https://syncloud.discourse.group/u/trevorprinn)\
**Post date:** [1 October 2022 13:41 UTC](https://syncloud.discourse.group/t/another-ldap-problem-i-suspect/243/16 "2022-10-01T13:41:29Z")

</div>

That’s right. That’s how I noticed the problem in the first place.

 ![Clip](https://global.discourse-cdn.com/free1/uploads/syncloud/original/1X/54d433323ab9bc9e696c1da79b28eb7b4c82a209.jpeg)

---

<div class="post-metadata">

**Author:** ![boris](https://avatars.discourse-cdn.com/v4/letter/b/74df32/32.png) [@boris](https://syncloud.discourse.group/u/boris)\
**Post date:** [1 October 2022 15:23 UTC](https://syncloud.discourse.group/t/another-ldap-problem-i-suspect/243/17 "2022-10-01T15:23:26Z")

</div>

Ok, the best option is to reinstall Nextcloud and see if that helps. Existing users added to Users app should be able to login missing ones you just add with the same login name.  
After reinstall you need to let Nextcloud know about existing files:

```auto
snap run nextcloud.occ files:scan --all

```

Also you can create a backup before reinstalling.  
Also Users app supports groups so you can create one and it should be visible in Nextcloud.
