Back to vBulletin 3.6 Add-ons

LDAP Authentication
Mod Version: 1.1, by zemic

This modification is in the archives.
vB Version: 3.6.5 Rating: (7 votes - 4.86 average) Installs: 38
Released: 18 Apr 2007 Last Update: 21 May 2007 Downloads: 392
Not Supported Uses Plugins Additional Files  

I've been using Vbulletin for a few years, and have had some great modifications from this community, so having had to recently integrate Vbulletin with LDAP for my University discussion boards I decided to release this as a modification. This is my present to the community .

Description:

LDAP authentication for Vbulletin.

How it works:

This does not modify Vbulletin files or Vbulletin login code in anyway. We simple stick some script infront of the login process so we can validate against LDAP. Below is a breakdown of what this thing does:
  • First looks to see if login form has been submitted
  • Checks if it should look up "this" user in LDAP (defined in ldapconfig)
  • Queries LDAP for the username
    • If user is returned check if VB MD5 password matches LDAP MD5 password
      • If it does, check the VB user table to see if the user is already in the table. If yes, update VB user table password with LDAP password by encrypting MD5 password with the users 'salt' key
      • If not, create a new user in database using VB classes/functions.
    • If user/pass do not match in LDAP then check if user is in VB user table.
      • If they are, change the password to something random so they cannot login with an old password
  • If a user is not returned from LDAP, assume the user has registered on the boards in the normal way and dont do anything to the VB user table.
Requirements:

The requirements are based on the system we use. It may / may not work with other Vbulletin versions:
  • PHP 4.3+
  • LDAP System
  • uid (username), mail (email address), and a field containing MD5 password
Installation:
  1. Download and unzip the file
  2. Edit "ldapconfig.php" and then upload into your "includes" folder
  3. Login to Admin CP and Add / Import the product (xml file)
Extra Info / Future Plans / Help:

This LDAP integration script currently requires you to have an LDAP field with the users password stored as MD5. From my understanding, CRYPT is the default password storage for LDAP so some of you may not have an MD5 field in LDAP with the users password encrypted as MD5.

It would be possible to modify the script to check against CRYPT, but it would also require a template edit as the login form converts the password field "onSubmit" to MD5. I did not do this because we already have the MD5 in LDAP as we use it on a number of different system already, and I did not want to change VB templates.

Also, I was unable to find documentation on doing a script / releasing a modification, so in future if someone could explain to me or change the script slightly to allow editing of LDAP configuration file within ADMIN CP interface, that would be great. This would also mean not having to upload a file into the includes folder.

I'm sure there will be something I havent thought of, or will make it easier if this script had this and that, so feel free to post your ideas, and suggestions on improving this modification.

Important Info:
Hack is provided free of charge (but if you really want to get rid of money PM me ). I make no guarantee it will work on your system, but it does on mine with 15,000 users .

Version:
  • 1.1 - You can now specify the field to authenticate against in ldapconfig.php (19/05/2007)
  • 1.0.1 - Corrected 'mysql_num_rows' query to use VB DB class call (19/04/2007)
  • 1.0 - First release (18/04/2007)
Hope its useful for some of you

Download

This modification is archived, downloads are still allowed.

File Type: %1$s ldap_authentication.zip (3.2 KB, 369 downloads)

Supporters / CoAuthors

  • zemic

Similar Mods

Integration with vBulletin vBulletin Ldap Authentication Plugin vBulletin 3.6 Add-ons
Miscellaneous Hacks LDAP Authentication Modification Graveyard

vblts.ru supports vBulletin®, 2022-2024