LDAP plugin on 1.3.0



  • Server
    • FOG Version: 1.3.0 (SVN 6050)
    • OS: Ubuntu 16.04
    Client
    • Service Version:
    • OS: Windows 10
    Description

    I’ve added and setup the LDAP plugin (see picture), following what was shown here . But when I go to login to the web portal I get a http 500 error and the below is the apache error log that coincides with the login attempt. I had had the LDAP plugin installed before, but uninstalled and reinstalled following this post

    [Wed Dec 28 11:47:23.003367 2016] [:error] [pid 17602] [client 192.168.34.152:2111] PHP Fatal error: Uncaught Error: Call to undefined function ldap_connect() in /var/www/fog/lib/plugins/ldap/class/ldap.class.php:266\nStack trace:\n#0 /var/www/fog/lib/plugins/ldap/hooks/ldappluginhook.hook.php(98): LDAP->authLDAP('iyoung', 'MYPASSWORD')\n#1 /var/www/fog/lib/fog/hookmanager.class.php(190): LDAPPluginHook->checkAddUser(Array)\n#2 
    /var/www/fog/lib/fog/user.class.php(229): HookManager->processEvent('USER_LOGGING_IN', Array)\n#3 /var/www/fog/lib/fog/fogcore.class.php(35): User->validatePw('iyoung', 'MYPASSWORD')\n#4 
    /var/www/fog/lib/fog/processlogin.class.php(241): FOGCore->attemptLogin('iyoung', 'MYPASSWORD')\n#5
    /var/www/fog/management/index.php(29): ProcessLogin->processMainLogin()\n#6 {main}\n thrown in /var/www/fog/lib/plugins/ldap/class/ldap.class.php on line 266, referer: http://192.168.34.23/fog/management/index.php?
    

    0_1482951619330_Capture.PNG



  • @iyoung Test completed. LDAP plugin added and test login succeeded.


  • Moderator

    @iyoung That is most likely the case, the php-ldap module, before the thread, was a user responsibility to add it in and not provided by the fog installer (if I remember correctly). Once Tom updated the ldap plugin it was logical that if The FOG Project supplied the plugin that the installer should install all required modules.


  • Senior Developer

    @iyoung yes I think october ish timeframe



  • @Tom-Elliott I looked at the creation date of my main FOG server and it looks like it was created on 09/15/2016, and I know that I went right to trunk when I installed FOG. I skimmed this thread which is, for the most part, newer than that. Was php-ldap added more recently?


  • Senior Developer

    @iyoung I think the difference was your “fresh” install knows to install ldap already. The upgrade, however, doesn’t.



  • Just looking at FOG installing now, I can see php7.1-ldap in the “Packages to be installed.” The only things I changed before installing FOG were installing aptitude and ssh-server.

    OS: Ubuntu 16.10 Server
    FOG: 1.3.0 (SVN 6051)


  • Moderator

    I had this working last week but it’s mysteriously stopped working now. I didn’t spend a lot of time looking into it, just giving this tidbit of info here.



  • @george1421 @tom-elliott I’ll spin up a host to see if it’s an issue on fresh installs of 1.3.0.


  • Moderator

    @iyoung Ok so now the question is why didn’t the installer install that for you?? (just an open question).

    That’s great it worked for you, Tom spent quite a bit of time working out the details on that plugin to make it a bit more universal.

    Marking issue as solved.



  • Success! I was able to login with a domain user, after installing php-ldap, without issue.


  • Moderator

    You will probably have other issues since you did not supply a bind DN. AD does not allow blind binds via ldap.


  • Moderator

    @iyoung FWIW: You only need to restart apache when you update php



  • php-ldap was not installed. I’ll restart and see what happens. I also looked in /opt/fog/.fogsettings and didn’t see php-ldap or a package that depends on it.


  • Senior Developer

    Unless it is an update. Please try installing manuallt


  • Moderator

    If I’m reading the code correctly, it appears that the php ldap module is not installed on your ubuntu box. The fog installer should do this by default.

    ref: https://www.howtoinstall.co/en/ubuntu/xenial/php-ldap


Log in to reply
 

Looks like your connection to FOG Project was lost, please wait while we try to reconnect.