LDAP auth. not populating users

I have installed owncloud 10.1 and hit this problem again. I have LDAP auth and I can log in to owncloud using LDAP. The issue is that until I log in for the first time, I am unable to search for my user and therefore unable to add my user to “external storage”.

Compare this with owncloud 9.1.4, this issue is not present there. I am able to add a user to an external storage access prior to logging into owncloud. their user does exist in LDAP and when you go to count users it finds all the users on both 9.1.4 and 10.1 systems.

Is this a bug or a design feature? Any suggestions how I can get the ability to add external storage users before they have logged in to owncloud?

At the moment I have 9.1.4 AND 10.1 running. I’ve copied over the config exactly as it is on 9.1.4 but the experience is different.

I googled some more and found this post here: Can't see LDAP users in the users page

I resolved / worked around this issue by doing the following:

  1. logged into the docker container for owncloud/server:10.1
  2. Ran this command:
    occ user:sync “OCA\User_LDAP\User_Proxy”
  3. now I can add the user before they logged in

The help for the command is as follows (for reference for anyone else that comes across it)

# occ help user:sync

Usage:
user:sync [options] [–] []

Arguments:
backend-class The quoted PHP class name for the backend, eg
- LDAP: “OCA\User_LDAP\User_Proxy”
- Samba: “OCA\User\SMB”
- Shibboleth: “OCA\User_Shibboleth\UserBackend”

Options:
-l, --list List all enabled backend classes
-u, --uid=UID Sync only the user with the given user id
-s, --seenOnly Sync only seen users
-c, --showCount Calculate user count before syncing
-m, --missing-account-action=MISSING-ACCOUNT-ACTION Action to take if the account isn’t connected to a backend any longer. Options are “disable” and “remove”. Note that removing the account will also remove the stored data and files for that account.
-r, --re-enable When syncing multiple accounts re-enable accounts that are disabled in ownCloud but available in the synced backend.
-h, --help Display this help message
-q, --quiet Do not output any message
-V, --version Display this application version
–ansi Force ANSI output
–no-ansi Disable ANSI output
-n, --no-interaction Do not ask any interactive question
–no-warnings Skip global warnings, show command output only
-v|vv|vvv, --verbose Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug

Help:
Synchronize users from a given backend to the accounts table.

This is not a workaround but the thing to do since ownCloud 10 as stated in the docs:

https://doc.owncloud.com/server/admin_manual/configuration/user/user_auth_ldap.html
https://doc.owncloud.com/server/admin_manual/configuration/server/occ_command.html#syncing-user-accounts

You should also setup a cron job with that command to keep your users synced

2 Likes