LDAP: Issue with having users being assigned to the proper AD groups
NOTE: This is for the same prospect that is having a WND issue (Jeez, its just a struggle getting stuff working for him!). Please see all the logs and environment specifics here: https://github.com/owncloud/windows_network_drive/issues/143. Description: We're actually having two separate issues:
- The group members wouldn't get assigned to their respective groups. For instance, we have 400 users and only 2 were shown as being part of the 'Domain Users' group. We've made sure to include all the groups we needed in the User Filter and the Group Filter tabs. They're shown number-wise, but all the membership containers seem to be ignored.
- Not all the users were shown. Another words, we didn't find all 400 people we wanted to add. Again, they were shown as present in both a User Filter and the Users screen, but they weren't physically shown there.
By looking at the logs, it looks like we're having these errors on a repeat: {"app":"PHP","message":"Illegal offset type in isset or empty at /var/www/html/owncloud/lib/private/user/manager.php#100","level":3,"time":"2014-11-11T20:25:46+00:00"} {"app":"PHP","message":"Illegal offset type in isset or empty at /var/www/html/owncloud/lib/private/user/database.php#209","level":3,"time":"2014-11-11T20:25:46+00:00"} {"app":"PHP","message":"Array to string conversion at /var/www/html/owncloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Statement.php#138","level":3,"time":"2014-11-11T20:25:46+00:00"} {"app":"PHP","message":"Illegal offset type in isset or empty at /var/www/html/owncloud/lib/private/user/database.php#250","level":3,"time":"2014-11-11T20:25:46+00:00"} {"app":"PHP","message":"Array to string conversion at /var/www/html/owncloud/apps/user_ldap/user_ldap.php#130","level":3,"time":"2014-11-11T20:25:46+00:00"} {"app":"PHP","message":"Array to string conversion at /var/www/html/owncloud/apps/user_ldap/user_ldap.php#131","level":3,"time":"2014-11-11T20:25:46+00:00"} {"app":"user_ldap","message":"You need to install bcmath module for PHP to have support for AD primary groups","level":2,"time":"2014-11-11T20:33:42+00:00"}
I haven't yet try installing bcmath module for PHP. Figured, we'd ship all the required modules with an appliance. So wanted to verify first.
@blizzz @jnweiger
- The group members wouldn't get assigned to their respective groups. For instance, we have 400 users and only 2 were shown as being part of the 'Domain Users' group.
Do the others have it set as primary group? Then you need bcmath – if LDAP server is AD. Is it the case? What are the LDAP settings (./occ ldap:show-config)?
- Not all the users were shown.
does it help to set the user display name attribute to "cn" (LDAP Advanced settings).
[…] /var/www/html/owncloud/apps/user_ldap/user_ldap.php#131
there's a comment :) which exact ownCloud version is running there?
@blizzz thanks for jumping on this, Arthur.
- Haven't checked their LDAP settings, but I'm guessing they're setup in the primary group. We'll verify that if bcmath wouldn't resolve it.
- Haven't try setting up the user display to CN yet. Suppose we can try that as well.
- 7.0.3 stable.
@sbelov1 I removed your last comment as you leak private data on a public place
{"app":"PHP","message":"Array to string conversion at /var/www/html/owncloud/apps/user_ldap/user_ldap.php#131","level":3,"time":"2014-11-11T20:25:46+00:00"}
:astonished:
but also the other messages are interesting. @sbelov1 could you apply following change, reproduce and check whether a file /tmp/oc-debug-bt is created? And if so, provide it?
diff --git a/apps/user_ldap/user_ldap.php b/apps/user_ldap/user_ldap.php
index ae4dfec..815238e 100644
--- a/apps/user_ldap/user_ldap.php
+++ b/apps/user_ldap/user_ldap.php
@@ -127,6 +127,10 @@ class USER_LDAP extends BackendUtility implements \OCP\UserInterface {
* @return boolean
*/
public function userExists($uid) {
+ if(is_array($uid)) {
+ $bt = debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS);
+ file_put_contents('/tmp/oc-debug-bt', print_r($bt,true));
+ }
if($this->access->connection->isCached('userExists'.$uid)) {
return $this->access->connection->getFromCache('userExists'.$uid);
}
@blizzz How do we reproduce the issue? Re-enter an LDAP settings, refresh the Users page or something else?
@sbelov1 you tell me ;)
@blizzz ok, I guess we'll just re-configure it and see what happens ;)
OK
@blizzz I think Bob just found the issue with Primary groups. We've reproduced it in his environment. Keep an eye on an email from him.
@blizzz Just experienced the same issue with another prospect yesterday. Whereas the group (not a Primary Group) was selected in both Group Filter and User Filter but did not get propagated with an LDAP bind. In other words, users were brought up as "unassigned" to any of the groups. Moreover, other groups (potentially all of them) were shown on the left nav panel whereas there suppose to be only one.
+1 with yet another customer who in fact had this issue resolved an initial wizard.php patch we've provided. Very very strange.
Here's the latest log output, although not sure we extract anything from it: for a paged search","level":1,"time":"2014-12-05T20:01:14+00:00"} {"app":"user_ldap","message":"Ready for a paged search","level":1,"time":"2014-12-05T20:01:14+00:00"} {"app":"user_ldap","message":"Ready for a paged search","level":1,"time":"2014-12-05T20:01:14+00:00"} {"app":"user_ldap","message":"Ready for a paged search","level":1,"time":"2014-12-05T20:01:14+00:00"} {"app":"user_ldap","message":"Ready for a paged search","level":1,"time":"2014-12-05T20:01:14+00:00"} {"app":"user_ldap","message":"Ready for a paged search","level":1,"time":"2014-12-05T20:01:14+00:00"} {"app":"user_ldap","message":"Ready for a paged search","level":1,"time":"2014-12-05T20:01:14+00:00"} {"app":"user_ldap","message":"Ready for a paged search","level":1,"time":"2014-12-05T20:01:14+00:00"} {"app":"user_ldap","message":"Ready for a paged search","level":1,"time":"2014-12-05T20:01:14+00:00"} {"app":"user_ldap","message":"Ready for a paged search","level":1,"time":"2014-12-05T20:01:14+00:00"} {"app":"user_ldap","message":"Ready for a paged search","level":1,"time":"2014-12-05T20:01:14+00:00"} {"app":"user_ldap","message":"Ready for a paged search","level":1,"time":"2014-12-05T20:01:14+00:00"} {"app":"user_ldap","message":"Ready for a paged search","level":1,"time":"2014-12-05T20:01:14+00:00"} {"app":"user_ldap","message":"Ready for a paged search","level":1,"time":"2014-12-05T20:01:14+00:00"} {"app":"user_ldap","message":"Ready for a paged search","level":1,"time":"2014-12-05T20:01:14+00:00"} {"app":"user_ldap","message":"Ready for a paged search","level":1,"time":"2014-12-05T20:01:14+00:00"} {"app":"user_ldap","message":"Ready for a paged search","level":1,"time":"2014-12-05T20:01:14+00:00"} {"app":"user_ldap","message":"Ready for a paged search","level":1,"time":"2014-12-05T20:01:14+00:00"} {"app":"user_ldap","message":"Ready for a paged search","level":1,"time":"2014-12-05T20:01:14+00:00"} {"app":"user_ldap","message":"Ready for a paged search","level":1,"time":"2014-12-05T20:01:14+00:00"} {"app":"user_ldap","message":"Ready for a paged search","level":1,"time":"2014-12-05T20:01:14+00:00"} {"app":"user_ldap","message":"Ready for a paged search","level":1,"time":"2014-12-05T20:01:14+00:00"} {"app":"user_ldap","message":"Ready for a paged search","level":1,"time":"2014-12-05T20:01:14+00:00"} {"app":"user_ldap","message":"Ready for a paged search","level":1,"time":"2014-12-05T20:01:14+00:00"} {"app":"user_ldap","message":"Ready for a paged search","level":1,"time":"2014-12-05T20:01:14+00:00"} {"app":"user_ldap","message":"Ready for a paged search","level":1,"time":"2014-12-05T20:01:14+00:00"} {"app":"user_ldap","message":"Ready for a paged search","level":1,"time":"2014-12-05T20:01:14+00:00"} {"app":"user_ldap","message":"Ready for a paged search","level":1,"time":"2014-12-05T20:01:14+00:00"} {"app":"user_ldap","message":"Ready for a paged search","level":1,"time":"2014-12-05T20:01:14+00:00"} {"app":"user_ldap","message":"Ready for a paged search","level":1,"time":"2014-12-05T20:01:14+00:00"} {"app":"user_ldap","message":"Ready for a paged search","level":1,"time":"2014-12-05T20:01:14+00:00"}