Another LDAP problem, I suspect

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.

Could you run these commands on the device:

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

snap run nextcloud.psql -c "select * from oc_ldap_group_members"
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)

looks good actually.
what about this:

snap run nextcloud.occ group:list
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).

Ah, you are in both groups somehow

You can try this

snap run nextcloud.occ group:removeuser abtuse trevor

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.

Did you try to remove yourself from abtuse group?

Yes. That’s after running the

snap run nextcloud.occ group:removeuser abtuse trevor


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

Can you send a screenshot of the menu ?


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?

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.

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

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

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:

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.