vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 4.x Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=245)
-   -   Integration with vBulletin - vBulletin Ldap Authentication Plugin 1.0.1 (https://vborg.vbsupport.ru/showthread.php?t=231909)

jeffsawyer 07-02-2010 05:49 PM

I'm sure this has been asked (and hopefully solved) somewhere, but I'm not having luck with my searches here or on Google. What I'd really like is a full complete LDAP solution for vBulletin. This LDAP mod is great, but only integrates the login and nothing else. Is there a full integration hack somewhere or do I need to hack it up myself? Or do most people use some sort of central account management hub on their sites and disable the broken pieces? i.e. multiple subdomains for each piece: account.mycoolsite.com, forum.mycoolsite.com, www.mycoolsite.com

Thanks! Looking forward to feedback.

Jeff

lluu 08-13-2010 08:16 PM

Does this mod allow for LDAPS (secure LDAP)? I am trying with OpenLDAP and have no idea how I would set encryption types, certs, etc.
Any help would be much appreciated, thanks.

northerndoctors 08-24-2010 01:53 PM

Hi,
I've been through the steps and added the code and put the files in the places told. When i try log in i get the error shown below right at the top of the window. Could you give me some suggestions to try?

Cheers Ben

"Warning: include(/Forums/ldapAuth/controller.php) [function.include]: failed to open stream: No such file or directory in [path]\login.php(109) : eval()'d code on line 1

Warning: include() [function.include]: Failed opening '/Forums/ldapAuth/controller.php' for inclusion (include_path='.;C:\xampp\php\pear\') in [path]\login.php(109) : eval()'d code on line 1"

jjuarez 10-11-2010 09:13 PM

Please help me, I install this mod and work perfect, but I need give administrator privileges to an Active Directory User, and when I try to enter with this user to Admin Panel, dispay the error on user or password.

I Think this is because in controller.php are this condition:

// if login form is admin or moderator login, dont use ldap authentication
if(($vbulletin->GPC['logintype'] == "cplogin") || ($vbulletin->GPC['logintype'] == "modcplogin"))
{
return;
}

How fix this that when this user try to access to admin panel, work.

Tanks a lot.

VirginBlue 10-12-2010 02:30 AM

Quote:

Originally Posted by FFSBC (Post 2004278)
Tried this with vbulletin 4-0-2 Patch Level 1 and Server 2003 AD with no luck. Installed Haqa's LDAP mod version 1.5 (which I had previously used with version 3.8.2 without issues) and it worked on the first try without any other tweaking:

https://vborg.vbsupport.ru/showthread.php?t=196596

Same

ecrist 03-26-2011 08:06 PM

1 Attachment(s)
I've updated the code from this add-on to include the code for authenticated (non-anonymous) binds, and well as having added the ability to keep the in-database password in-sync with the password stored in LDAP. The allows the user to use the same password for the admin/mod control panels as they do for the forum main pages.

There are a few things I'd like to do in the near future:
  1. Update LDAP password from vB profile update page.
  2. Update email from vB profile update page
  3. Update email from LDAP front-end.

Please take these code changes and let me know what you think.

Swarm 05-31-2011 04:24 PM

Hello,
Does anyone know if this plugin has been worked on recently? I've followed the directions and notes from this thread fairly extensively but still cannot get it to work entirely.

Using: AD, ldapAuth_1.0.2 (non-anonymous)

I can verify that my credential is binding correctly. However when I try to log in, i see the following errors:

Code:

Warning: ldap_search() [function.ldap-search]: Search: Bad search filter in [path]\ldapAuth\controller.php on line 38

Warning: ldap_get_entries() expects parameter 2 to be resource, boolean given in [path]\ldapAuth\controller.php on line 39

controller.php
Code:

<?php

error_reporting(E_ALL & ~E_NOTICE);
define('THIS_SCRIPT', 'controller.php');

// some basic requirements
require_once('./global.php');
require_once(DIR . '/includes/functions_login.php');
require_once(DIR . '/ldapAuth/ldapfunctions.inc.php');
require_once(DIR . '/ldapAuth/ldapconfig.inc.php');

// if login form is admin or moderator login, dont use ldap authentication
if(($vbulletin->GPC['logintype'] == "cplogin") || ($vbulletin->GPC['logintype'] == "modcplogin"))
{
        return;
}

// if there is no password submitted, redirect to standard error
if ($vbulletin->GPC['vb_login_password'] == '')
{
        eval(standard_error(fetch_error('badlogin', $vbulletin->options['bburl'], $vbulletin->session->vars['sessionurl'], $strikes)));
}

// create the ldap search filter
$ldapFilter = "($samaccountname=" . $vbulletin->GPC['vb_login_username'] .")";

// connect to the LDAP Server
$ldapConnection = ldap_connect($ldapServer, $ldapPort);
//ldap_set_option($ldapConnection, LDAP_OPT_PROTOCOL_VERSION, 3);

if($ldapConnection){
        $ldapBind = ldap_bind($ldapConnection, $ldapBindUser, $ldapBindPassword);
        // search for the username and get the DN
        $searchDn = ldap_search($ldapConnection,$ldapBase,$ldapFilter);
        $searchResult = ldap_get_entries($ldapConnection,$searchDn);
       
        // if no user is found in ldap, redirect to standard error
        if(sizeof($searchResult) < 2)
        {
                eval(standard_error(fetch_error('badlogin', $vbulletin->options['bburl'], $vbulletin->session->vars['sessionurl'],$strikes)));
        }

        // write the FIRST found DN to $bindDn;
        $bindDn=$searchResult[0]['dn'];

        // bind to the ldap server with specified credentials (dn, password)
        $ldap_bind = ldap_bind($ldapConnection, $bindDn, $vbulletin->GPC['vb_login_password']);

        // close the server connection
        ldap_close($ldapConnection);

        if ($ldap_bind != 1){
                // ldap bind did not succeed, wrong username/password combination
                eval(standard_error(fetch_error('badlogin', $vbulletin->options['bburl'], $vbulletin->session->vars['sessionurl'], $strikes)));
        } else {
                // generate a template for vBulletin user database
                [...]

ldapconfig
Code:

<?php

error_reporting(E_ALL & ~E_NOTICE);
define('THIS_SCRIPT', 'ldapconfig.php'); 

// Server Settings
$ldapBindUser = "mydomainadminusername";
$ldapBindPassword = "mypass";
$ldapServer = "x.x.x.x";
$ldapPort = 389;
$ldapBase = "ou=users,dc=domain,dc=local";

// Search Settings
//$samaccountname = "cn";
$ldapEmailAttr = array( "mail" );
$noEmailExists = ""

?>

Any Ideas?

Eslob 01-29-2012 10:23 AM

thank you for this mod, its little complicated but i'm trying to learn more about it.

as i know ldap mostly used for emails (microsoft outlook)

J29953E37A78 12-27-2012 03:37 AM

Hi there,
I have downloaded the plugin and done up to point 5 but I don't understand point 6 (in admin cp import the product at "Plugins & Products -> Download / Upload Plugins", use "Import Plugin Definitions XML File" at the bottom of the page, example import input './ldapAuth/ldap-plugin.xml'

Where do I find this?

Frustrated
thanks

miklr 01-30-2013 08:30 PM

Quote:

Originally Posted by J29953E37A78 (Post 2392938)
Hi there,
I have downloaded the plugin and done up to point 5 but I don't understand point 6 (in admin cp import the product at "Plugins & Products -> Download / Upload Plugins", use "Import Plugin Definitions XML File" at the bottom of the page, example import input './ldapAuth/ldap-plugin.xml'


Where do I find this?

Frustrated
thanks

I noticed that malcolmx has a supported tag on this. Has anyone had success installing it on 4.2?


All times are GMT. The time now is 12:38 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.02222 seconds
  • Memory Usage 1,752KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (3)bbcode_code_printable
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete