FreePBX | Register | Issues | Wiki | Portal | Support

Active Directory not syncing on FreePBX 14


(Windward) #1

Here is what I see when I run a fwconsole --syncall --verbose --force , it fails everytime at the same point:

"Finished adding users from non-primary groups
Updating Primary Groups
PHP Fatal error: Call to a member function getConvertedGuid() on null in /var/www/html/admin/modules/userman/functions.inc/auth/modules/Msad2.php on line 506
Whoops\Exception\ErrorException: Call to a member function getConvertedGuid() on null in file /var/www/html/admin/modules/userman/functions.inc/auth/modules/Msad2.php on line 506
Stack trace:

  1. Whoops\Exception\ErrorException->() /var/www/html/admin/modules/userman/functions.inc/auth/modules/Msad2.php:506 "
    As a result, it never finishes, and thus I am stuck with this message when I try and modify my Group permissions “The directory for this group is currently locked while updates are being run”

(Andrew Nagy) #2

Your users don’t have primary groups, Or the primary group is not in the group filter.


(Windward) #3

SOLVED

Thank you for that! You pointed us in the right direction, and it is now working. The group membership of my freepbx service account was not quite in the right place. Once it was made a member of Administrators then it worked straight away. We were trying it , being only a member of Domain Users


(Windward) #4

whoops, spoke too soon. Now after attempting to sync (set it to 30 minutes) on it’s own, it fails again with the same error.


(Andrew Nagy) #5

The error is the same. You don’t have any primary groups assigned to your users. You can update to the edge version of User Manager but this is a misconfiguration in Active Directory as users should always have a primary group assigned.


(Windward) #6

Thank you very much for your help. any idea why after syncing , I cannot use the ad username to login? I have pulled in all the users and groups. Updated the AD group that my username is in to allow logins to UCP and the All the admin stuff in the Freepbx gui, however it will not work. I have re-ordered the directories and such so that my newly created AD directory is the default, and comes first on the list.

It works inasmuch as I cannot login with my username anymore using my old , pre-ad password . However it refuses to let me in with any password now. I have a tcpdump trace running where I can see the pbx contacting my ad server but no authentication is taking place. I have enabled edge mode, and downloaded the most recent UCP 14.0.3.10 .

I can still login with “maint” user, as it does not exist in AD . I have tried all the permutations that I can think of with regards to the username: domain\username ; username@domain-name ; username; etc but nothing is working.


(Andrew Nagy) #7

userman v14.0.3.11 fixes the login issue

It will also report back the SID it tried to lookup for the primary group


(Windward) #8

Looks like that fixed it! Thanks! Now when I log in, it complains that I don’t have the broadcast module installed, when if fact I do. However, I just do a reload of the page and it continues on to the dashboard.

Exception
Unable to locate the FreePBX BMO Class 'Broadcast’A required module might be disabled or uninstalled. Recommended steps (run from the CLI): 1) fwconsole ma install broadcast 2) fwconsole ma enable broadcast
/var
/www
/html
/admin
/libraries
/BMO
/Self_Helper.class.php

                    $needs_zend = isset($info[$module]['depends']['phpcomponent']) && stristr($info[$module]['depends']['phpcomponent'], 'zend');
                    $licFileExists = glob ('/etc/schmooze/license-*.zl');
                    $complete_zend = (!function_exists('zend_loader_install_license') || empty($licFileExists));
                    if ($needs_zend && class_exists('\Schmooze\Zend',false) && \Schmooze\Zend::fileIsLicensed($try) && $complete_zend) {
                        break;
                    }
 
                    include $try;
                    $loaded = $try;
                    break;
                }
            }
        }
 
        // Right, after all of this we should now have our object ready to create.
        if (!class_exists($objname,false) && !class_exists($this->moduleNamespace.$objname,false) && !class_exists($this->freepbxNamespace.$objname,false)) {
            // Bad things have happened.
            if (!$loaded) {
                $sobjname = strtolower($objname);
                throw new \Exception(sprintf(_("Unable to locate the FreePBX BMO Class '%s'"),$objname) . sprintf(_("A required module might be disabled or uninstalled. Recommended steps (run from the CLI): 1) fwconsole ma install %s 2) fwconsole ma enable %s"),$sobjname,$sobjname));
                //die_freepbx(sprintf(_("Unable to locate the FreePBX BMO Class '%s'"),$objname), sprintf(_("A required module might be disabled or uninstalled. Recommended steps (run from the CLI): 1) amportal a ma install %s 2) amportal a ma enable %s"),$sobjname,$sobjname));
            }
 
            // We loaded a file that claimed to represent that class, but didn't.
            throw new \Exception(sprintf(_("Attempted to load %s but it didn't define the class %s"),$try,$objname));
        }
 
        return true;
    }
}

In Addition one thing that is not ideal is that it displays the password in plain-text on the “Environment & Details” page


(TheJames) #9

Make sure you are running Framework 13.0.192.8 or 14.0.1rc1.19


(Windward) #10

Hi, I am running 14.0.1rc1.21 . Should I downgrade?


(Tony Guadagno) #11

fyi, i am having the exact same issue


(Windward) #12

Right. I saw your thread and was going to post on it, however it took me a while to get to the same problem as you are having :slight_smile: (Thanks for all the details you have posted btw, I really need this to work ! )


(Andrew Nagy) #13

https://issues.freepbx.org/browse/FREEPBX-15088

Fixed in Framework 14.0.1rc1.23


(Windward) #14

Confirmed works for me now. thanks!


(Tony Guadagno) #15

windward, i just applied 23 and it fixed my login as well, however i notice that the dashboard widges do not paint…did you apply all the edge modules? or just core? are you seeing the same issue?

thanks


(Andrew Nagy) #16

Upgrade dashboard. We fixed that as well yesterday.


(Tony Guadagno) #17

Andrew, I just checked and I did upgrade it last night, i think that is when it broke. i am on 14.0.2.3 I just tried to reinstall and that seemed to have no affect…am i on the right version?


(Andrew Nagy) #18

dashboard v14.0.2.4


(Tony Guadagno) #19

andrew, that did it, thanks!


(Windward) #20

My Dashboard is working. My backup to FTP is now broken though, I understand from reading the forums that this is not really unexpected.
Storing backup…
Exception: DateTime::__construct(): Failed to parse time string (-or-directory. 00:00) at position 0 (-): Unexpected character in file /var/www/html/admin/modules/backup/vendor/touki/ftp/lib/Touki/FTP/FilesystemFactory.php on line 64