owncloud / owncloud/user_ldap

occ user:sync does not work for one user only

Open
#456 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
PHP
Stars
17
Forks
19
Avg merge
11h 40m
Merged PRs (30d)
2

Description

Description

When we do occ user:sync "OCA\User_LDAP\User_Proxy" then this syncs all the users from the LDAP server.
Running occ user:sync "OCA\User_LDAP\User_Proxy" -u <uid> should only sync user with id <uid>.

Steps
  1. Setup LDAP server and add to owncloud.
  2. Add users to the LDAP server (for eg. user1 and user2)
  3. run occ user:sync "OCA\User_LDAP\User_Proxy" to sync all the users
  4. Modify an attribute on the LDAP server for user1 (eg Display Name).
  5. run occ user:sync "OCA\User_LDAP\User_Proxy" -u user1 to sync just for user1
Expected Behavior

The displayName attribute of the user gets updated in owncloud.

Actual Behavior

We get following output

➜ sudo -u www-data php occ user:sync "OCA\User_LDAP\User_Proxy" -u user1

If unknown users are found, what do you want to do with their accounts? (removing the account will also remove its data)
  [0] disable
  [1] remove
  [2] ask later
 > 0
Syncing user1 ...
Disabling accounts:
user1, User Onessss, user1@example.org disabled

And the attribute of the user doesn't get changed.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the issue with the documented LDAP setup and the occ user:sync "OCA\User_LDAP\User_Proxy" -u user1 command. Trace the user-sync handling for the -u option and compare it with the reported disabling output; done means the selected user's changed displayName is updated without syncing all users or disabling the account.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
authentication
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.