Just to add on here – the failure after reboot is a red herring – although it’s happened twice after reboot today, it’s also worked fine twice after reboots! π
Off the top of my head, it sounds like the issue is with your server. You should be receiving a specific error message from the plugin if there’s an issue. Most likely “No directory server available”.
If there is something wrong with the prebind credentials, you should be getting the error message “Pre-binding credentials denied.” You can also check the table *_options (where * is what you have the table prefix set to) for “dirAuthPreBindPassword” and make sure the password has been saved. If it is there before you reboot the server, but gone after you reboot, then something funky is going on with your MySQL server.
Also, what OS is your server?
Thanks for the reply! I’m still tracking things down but for info the WordPress server itself is running on CentOS 7 with MariaDB – God only knows what the LDAP server is running on; it’s hidden in the depths of our Corporate company maintained by elves and magic pixies I think π
I’ve checked the dirAuth* settings in options and all looks fine as far as I can tell, including the password. I’m not a great PHP user but as soon as I can find out how to manually use php-ldap I’ll knock up a quick test to run on the WordPress server to try and knock WordPress out of the equation. For the minute though I’m using JExplorer on a Windows box sitting next to the WordPress server – which works every time π
Thanks for help so far – I’ll keep digging ….
Here’s a script you can use
http://pastebin.com/Ri07VXkN
You’ll need to change lines 4-8 with the specifics for your organization. This will run through and do basically the same thing as wpDirAuth but without all of the wordpress stuff.
You might need to change lines 79-86 if your organization’s user names and passwords have different requirements.
Line 172 contains intentional bogus credentials to show what happens when the prebind credentials (lines 4 and 5) succeed but the person attempting to authenticate fails (or no one by that ssoid/samaccountname) exists.
The other tool that can help is either Apache Directory Studio and/or Softerra’s LDAP Browser (2nd tab).
(Sorry for delay in reply – got dragged into something else last night)
Very useful info – thanks! The tests I ran last night seemed to work ok outside of WordPress – will download your script now and have a go. Very interested to see the prebind=ok authenticate=no test results.
I’ve also started to disable plugins inside WordPress to see if anything is clashing somehow.
The server isn’t “live” yet so as a final test I can always rebuild the box with bare basic WordPress + your plugin and see.
Thanks again for your help … I’ll let you know how I get on.
Argh! My long detailed reply got lost when I submitted it π
Basically I’d typed in:
Thanks for the script – very useful!
Tests last night outside of WordPress seemed to work (with my basic simply script)
Trying your script today
If that works as well I’m going to start disabling plugins in case it’s a weird clash
If all else fails I’ll rebuild with just a clean WordPress & your plugins
Thanks for help & guidance – much appreciated! Will let you know how I get on π
Hmmm – double post last time – oops!
Well – it’s been an interesting evening – long story short, outside of WordPress works fine so I disabled all the plugins I have and then re-enabled them one by one without any config changes. I haven’t had an error since …..! Must admit I’m scratching my head as to why π
I’m about to update to the latest version this morning – cross fingers it keeps working ok π
And just to confirm, yes, all still works π
I’ll mark this as resolved as I can’t see an issue with your plugin at all, although I wish I’d managed to find what the actual issue is!
Thanks again for your replies – much appreciated.
Not a problem. Let me know if the issue pops back up.