Wednesday 3 August 2011

vBulletin - Enable LDAP Authentication for AdminCP, ModCP

If you want to enable LDAP Authentication for AdminCP, ModCP, just do follow this:


  1. First: you need configuration your vBulletin login via LDAP Authentication follow structure at here: http://www.vbulletin.org/forum/showthread.php?t=231909&highlight=ldap+authenticate
    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:
      • if ($vbulletin->GPC['vb_login_username'] == '')
      • {
      •    eval(standard_error(fetch_error('badlogin', $vbulletin->options['bburl'], ....
    5. Add hook after if statement, becomes:
      • 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. Activate plugin system (if not done already) in admincp
    7. 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'
    8. Recheck if the include for controller.php is right
    9. In includes/class_bootstrap.php search for:
      • $show['nopasswordempty'] 
    10. And change:
      • defined('DISABLE_PASSWORD_CLEARING') ? 1 : 0; 
    11. to:
      • defined('DISABLE_PASSWORD_CLEARING') ? 0 : 1; 
    12. Configure the ldap settings in: ldapconfig.inc.php
    13. Test the product
  2. Maybe you will got this error: http://shinphp.blogspot.com/2011/08/php-ldapbind-unable-to-bind-to-server.html
  3. Go to file: "/forum-root/includes/adminfunctions.php"
  4. Find: <form action="../login.php?do=login" method="post" name="loginform" onsubmit="md5hash(vb_login_password, vb_login_md5password, vb_login_md5password_utf); js_do_options(this)">
  5. Replace: <form action="../login.php?do=login" method="post" name="loginform" onsubmit="md5hash(vb_login_password, vb_login_md5password, vb_login_md5password_utf, 1)">
  6. Done!

Good luck!

No comments:

Post a Comment