TurnKey Linux Virtual Appliance Library

Active Directory Integration through LDAP in WordPress

ethanthekiwi's picture

I would like to integrate my organizations WordPress 3.0.1 intranet site with our Active Directory server, so users can log in to comment in WordPress and post in the forum (bbpress which is already integrated with WordPress) without having to create a second account. I installed the Active Directory Integration plugin, but it gave me this error: "ATTENTION: You have no LDAP support. This plugin won´t work." This was a bit vague for me so I tried a different plugin, Simple LDAP Login. It gave me this error:

Plugin could not be activated because it triggered a fatal error.

Fatal error: Uncaught exception 'adLDAPException' with message 'No LDAP support for PHP. See: http://www.php.net/ldap' in /var/www/wordpress/wp-content/plugins/simple-ldap-login/adLDAP.php:338 Stack trace: #0 /var/www/wordpress/wp-content/plugins/simple-ldap-login/Simple-LDAP-Login.php(60): adLDAP->__construct(Array) #1 /var/www/wordpress/wp-admin/plugins.php(158): include('/var/www/wordpr...') #2 /var/www/wordpress/wp-admin/plugins.php(160): plugin_sandbox_scrape('simple-ldap-log...') #3 {main} thrown in /var/www/wordpress/wp-content/plugins/simple-ldap-login/adLDAP.php on line 338

I began to sense a pattern so I started doing some reading on LDAP and PHP. From what I understood, I need to enable LDAP in my PHP installation. I believe that means I need to install or update something on the Turnkey Linux WordPress application side of things, but I am not sure how to do that. I found instructions for doing this on a Windows server, but could not find anything similar for Turnkey.

Let me know if you need anymore info about my system.

Try:

Try installing php5-ldap package and restarting apache.

apt-get install php5-ldap

That should add ldap support to php. But I'm just guessing 

ethanthekiwi's picture

Thanks That Worked

That worked, thank you very much. (and good guess)

Here is what I did for anyone with the same problem:

I went into webmin for the Turnkey Linux appliance. From the tools menu I selected Command Shell and then ran the apt-ge install php5-ldap command and it installed php5-ldap. Then I went to Servers - Apache webservers and clicked stop apache then start apache. This of course took the site down for all of a few seconds. Then I went into WordPress, clicked activate on the Simple LDAP plugin and it was working. 

Glad to help!

Glad to help!

wordpress + Active Directory Intigration Plugin

Hello,

 

I thought you might be able to help me.  I installed AD intigration, and it works fine if I am loged in as admin, but when I log out, and then try and login again I am unable to login as admin only as a subscriber.  Do you know of a fix?

 

Thanks,

 

Aaron

ethanthekiwi's picture

Are you talking about logging

Are you talking about logging in to WordPress or bbPres? If it is WordPress then I don't have any ideas. bbPress on the other hand will  not let you get to the admin panel unless you log in using local (non AD) credentials. 

I was able to resolve this

Hi Ethan,

 

It completly locked me out, so what I wound up doing is removing my database and doing a fresh install, and then importing my content back in.  It took me about a day to do this eitire process.  The problem was that I had ad integration installed and I had it set up for groups, and I guess it wasn't authenticating.  the result was that it would not allow anyone even the admin into wordpress.

 

Thanks,

 

Aaron

ethanthekiwi's picture

No Problem

No Problem

Hey

OpenLDAP’s proxy service can allow LDAP operations to cross the boundaries between AD and OpenLDAP deployments. To demonstrate this proxy service, we walk through the steps to make AD’s cn=Users container, which by default contains all user objects, part of an OpenLDAP directory. To produce the examples in this article, I used CentOS 4.3, OpenLDAP 2.2.13, and AD running on Windows Server 2003 R2. Later in the article, I’ll show you a limitation in the commonly deployed OpenLDAP 2.2, which you can solve by installing OpenLDAP 2.3 on CentOS 4.3.

Update

tried running        apt-get install php5-ldap

I'm getting  this "E: dpkg was interrupted, you must manually run 'dpkg --configure -a' to correct the problem."

Is there an update on the command to add ldap support for php?

Nevermind...

WHen I read my own post I fixed my problem...

Ran 'dpkg --configure -a'

 

LONG DAY!

Active Directory plugin needed?

Does this mean we can set up integration without using a plugin?  Or do I still need the plugin?  Thanks.

 

 

You still still need a

You still still need a plugin.

 

You would need:

  • Directory Server
  • Wordpress Plugin for LDAP 
  • Wordpress
  • PHP with LDAP installed

Post new comment

The content of this field is kept private and will not be shown publicly. If you have a Gravatar account, used to display your avatar.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <p> <span> <div> <h1> <h2> <h3> <h4> <h5> <h6> <img> <map> <area> <hr> <br> <br /> <ul> <ol> <li> <dl> <dt> <dd> <table> <tr> <td> <em> <b> <u> <i> <strong> <font> <del> <ins> <sub> <sup> <quote> <blockquote> <pre> <address> <code> <cite> <strike> <caption>

More information about formatting options

Leave this field empty. It's part of a security mechanism.
(Dear spammers: moderators are notified of all new posts. Spam is deleted immediately)