• Resolved Steve Cliff

    (@stevecliff)


    Hi,

    I’m talking to an LDAPS instance and initially everything works correctly. However, it seems (still trying to get a handle on it!) that when the plugin fails to contact the LDAP server for some reason and/or not get a response in time, all calls from that point don’t work. As soon as I go into the wpDirAuth settings, re-enter the password and click update settings, everything is then fine again until the next time it has an issue connecting.

    It’s also looking like the first time the WordPress server is rebooted I again have to go back in and re-enter the credentials before things will work.

    Really puzzled here as to where the issue is (because it’s intermittent I’m having problems tracking it down) – but it’s happened three times now over the last week. Anything you can suggest would be gratefully received! πŸ™‚

    https://ww.wp.xz.cn/plugins/wpdirauth/

Viewing 9 replies - 1 through 9 (of 9 total)
  • Thread Starter Steve Cliff

    (@stevecliff)

    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! πŸ™

    Plugin Author Paul Gilzow

    (@gilzow)

    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?

    Thread Starter Steve Cliff

    (@stevecliff)

    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 ….

    Plugin Author Paul Gilzow

    (@gilzow)

    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).

    Thread Starter Steve Cliff

    (@stevecliff)

    (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.

    Thread Starter Steve Cliff

    (@stevecliff)

    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 πŸ™‚

    Thread Starter Steve Cliff

    (@stevecliff)

    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 πŸ™‚

    Thread Starter Steve Cliff

    (@stevecliff)

    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.

    Plugin Author Paul Gilzow

    (@gilzow)

    Not a problem. Let me know if the issue pops back up.

Viewing 9 replies - 1 through 9 (of 9 total)

The topic ‘Stops working after initial failure (possibly?)’ is closed to new replies.