Skip to content

Force sync a ldap user through command line or API #27948

@goyome

Description

@goyome

How to use GitHub

  • Please use the 👍 reaction to show that you are interested into the same feature.
  • Please don't comment if you have no relevant information to add. It's just extra noise for everyone subscribed to this issue.
  • Subscribe to receive notifications on status change and new comments.

Is your feature request related to a problem? Please describe.
I'm using the app user_ldap to synchronize users into nextcloud.
When I try to synchronize large population, the time needed for new users to appear in nextcloud users can be really long (some have taken days). I tried to increase the value of ldap_paging_size but the time for syncing new users will depend on the current offset and the number of loop needed to extract new users.
The sync itself is not happening at every cron execution and make the total sync time even longer.

Describe the solution you'd like
I would like to be able to synchronize a specific user who I know was added to ldap shortly before. There could be a cli call verifying the existence of the user in ldap and syncing it if it does exist.
php occ ldap:sync username

Describe alternatives you've considered
Another way could be to find a way to sync new account or recently modified accounts by filtering on modifyTimestamp > last_execution_time.

Additional context
There seems to be hard-coded min and max interval value in the sync job (apps/user_ldap/lib/Jobs/Sync.php). I'm not sure if they're not doing more harm than good.

Metadata

Metadata

Assignees

Labels

4. to releaseReady to be released and/or waiting for tests to finishenhancement

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions