Go Back   vb.org Archive > vBulletin Modifications > vBulletin 4.x Modifications > vBulletin 4.x Add-ons

Reply
 
Thread Tools
vBulletin Ldap Authentication Plugin 1.0.1 Details »»
vBulletin Ldap Authentication Plugin 1.0.1
Version: 1.01, by malcolmx malcolmx is offline
Developer Last Online: Mar 2020 Show Printable Version Email this Page

Category: Integration with vBulletin - Version: 4.0.0 Rating:
Released: 01-01-2010 Last Update: Never Installs: 27
Uses Plugins
Re-useable Code Code Changes Additional Files  
No support by the author.

This is a very small plugin for enabling ldap authentication for vBulletin Suite 4. The original version is from www.sartori.at.

if you need any help installing the plugin, please post into this thread here.

if you need any extra changes i will modify the plugin for extra charge.

In contrast to the ldap authentication from zemic my board can authenticate against every - already deployed - ldap directory without changeing the encryption type.

If the ldap user is not added in the VBulletin database, the user is automatically added the first time he authenticates against the ldap. if the user already exists then nothing is changed, except the authentication against the directory.

in the admin or moderator panel no user is authenticated against the directory.

Requirements
  • php with ldap support

Installation Notes:
  1. copy ldapAuth directory to your vb forum installation directory
  2. change the path to controller.php directory in ldap-plugin.xml
  3. copy the hooks_ldap.xml to FORUM_ROOT/includes/xml directory
  4. in login.php search for:
    PHP Code:
    if ($vbulletin->GPC['vb_login_username'] == '')
             {
              eval(
    standard_error(fetch_error('badlogin'$vbulletin->options['bburl'], ....
             } 
    add hook after if statement, becomes:
    PHP Code:
    (if ($vbulletin->GPC['vb_login_username'] == ''

      eval(
    standard_error(fetch_error('badlogin'$vbulletin->options['bburl'], .... 

    (
    $hook vBulletinHook::fetch_hook('ldap_login_hook')) ? eval($hook) : false
  5. activate plugin system (if not done already) in admincp
  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'
  7. recheck if the include for controller.php is right
  8. in includes/class_bootstrap.php search for:
    PHP Code:
    $show['nopasswordempty'
    and change:
    PHP Code:
    defined('DISABLE_PASSWORD_CLEARING') ? 0
    to:
    PHP Code:
    defined('DISABLE_PASSWORD_CLEARING') ? 1
  9. configure the ldap settings in: ldapconfig.inc.php
  10. test the product


Additional Notes:
If you are running a Microsoft Active Directory as Ldap server you have to change some settings to allow anonymous queries. This is described at
Novell and Microsoft


I would be happy if you support my modification in any way. Install or nominate it or donate some cents at paypal.

vBulletin 3.6 version

Download Now

File Type: zip ldapAuth_1.0.1.zip (6.4 KB, 406 views)

Supporters / CoAuthors

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #2  
Old 01-02-2010, 09:04 PM
Zate Zate is offline
 
Join Date: Apr 2003
Posts: 59
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Does this support native vb functions such as changing password, username or email address?
Reply With Quote
  #3  
Old 01-03-2010, 06:25 AM
malcolmx malcolmx is offline
 
Join Date: May 2003
Posts: 45
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

hello,

since this addon does not use vb functions to authenticate the users, those features are not available. if you want to change passwords / email addresses in your ldap / active directory then use
software that is available on the open source market.

if you want ldap functions implemented in vBulletin, you need another addon or need a request for paid services.

greetings

-malc
Reply With Quote
  #4  
Old 01-08-2010, 11:54 PM
yambert yambert is offline
 
Join Date: Jan 2010
Posts: 1
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

A few things that could be more clear on the installation notes:

4. in login.php search for:

PHP Code:
if ($vbulletin->GPC['vb_login_username'] == '')
{
  eval(
standard_error(fetch_error('badlogin'$vbulletin->options['bburl'], ....

add hook after if statement, becomes:
PHP Code:
if ($vbulletin->GPC['vb_login_username'] == '')
{
  eval(
standard_error(fetch_error('badlogin'$vbulletin->options['bburl'], ....
}
(
$hook vBulletinHook::fetch_hook('ldap_login_hook')) ? eval($hook) : false
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'
Reply With Quote
  #5  
Old 01-09-2010, 05:17 AM
malcolmx malcolmx is offline
 
Join Date: May 2003
Posts: 45
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

thanks for the suggestions. changes made!

-malc
Reply With Quote
  #6  
Old 01-19-2010, 02:13 AM
DraculaVN DraculaVN is offline
 
Join Date: Aug 2005
Posts: 48
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Dear malcolmx !

Thanks for your plugin. Now I want to a question for you: How to config plugin if my LDAP don't allow anonymous queries.

Because my company don't allow anonymous queries.

Please help me !!!
Reply With Quote
  #7  
Old 01-19-2010, 03:37 AM
malcolmx malcolmx is offline
 
Join Date: May 2003
Posts: 45
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by DraculaVN View Post
Dear malcolmx !

Thanks for your plugin. Now I want to a question for you: How to config plugin if my LDAP don't allow anonymous queries.

Because my company don't allow anonymous queries.

Please help me !!!
as there habe been alot of questions for this feature (in the "old" plugin, too) i will add it to the code. see it online within 2 days.

kind regards

-malc
Reply With Quote
  #8  
Old 01-19-2010, 04:52 AM
DraculaVN DraculaVN is offline
 
Join Date: Aug 2005
Posts: 48
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Oh ... I'm feeling happy with your answer. I will waiting for your plugin. I donate this plugin .
Thanks so much
Reply With Quote
  #9  
Old 01-20-2010, 02:09 PM
danlavu danlavu is offline
 
Join Date: Dec 2009
Posts: 10
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I hope this helps but I modified the controller.php so you can bind a username and password, so you do not need to open your ldap server.

My changes are below.

Add the following at

Code:
// connect to the LDAP Server

++$ldapBindUser = 'YOUR_BIND_USER';
++$ldapPassword = 'YOUR_BIND_USER_PASSWORD';
For every instance of $ldapConnection add the follow below the line. Should be two instances.
Code:
 
$ldapConnection = ldap_connect($ldapServer, $ldapPort);
++$ldapBind = ldap_bind($ldapConnection, $ldapBindUser, $ldapPassword);
Make some changes to the if else statement, delete or comment out the following and change one variable.
Code:
 // 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);

        // ldap bind did not succeed, wrong username/password combination
        ++if ($ldapBind != 1)
        --if ($ldap_bind != 1)
Now you should be able to connect to a more secure ldap server. Anonymous queries against my AD makes it hard for me to sleep at night.
Reply With Quote
  #10  
Old 01-20-2010, 11:23 PM
DraculaVN DraculaVN is offline
 
Join Date: Aug 2005
Posts: 48
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Oh thanks danlavu. I will check it.
Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 05:22 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.04518 seconds
  • Memory Usage 2,333KB
  • Queries Executed 25 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (3)bbcode_code
  • (7)bbcode_php
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (4)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (9)postbit
  • (1)postbit_attachment
  • (10)postbit_onlinestatus
  • (10)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_attachment
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete