Debug ldap support for cPanel accounts

mobcdi

Well-Known Member
Jul 13, 2009
109
0
66
Hi all,

I'm having a strange problem getting ldap working for accounts on a WHM server. I have php module and apache module installed but I can't get any account to use ldap.

For testing I installed drupal 6 with the ldap help module. It adds a status option to a drupal install to see if ldap should work on the site the problem is that when I try to access it the site errors out and a script timed out message is added to /usr/local/apache/logs/error_log

Is there anyway I can get more details about whats happening with regards ldap, apache and php5
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,910
2,213
363
Hello :)

Could you paste the full error message that outputs to the Apache error log when you attempt to access the website?

Thank you.
 

mobcdi

Well-Known Member
Jul 13, 2009
109
0
66
It doesn't seem to have any real details just that it takes a long time to respond before timing out

Message to User

The request was not completed. The server met an unexpected condition.

193.1.101.122/~cPanelAccount/drupal6/?q=admin/settings/ldaphelp/status (port 80)

Nothing in accounts cPanel error log or raw access log

The Apache Error logs give
"File does not exist :/usr/local/apache/htdocs/home referer http://cPanelAccountIP/cPanelAccount/drupal6/?q=admin/settings/ldaphelp/status

But I wouldn't expect a file to exist in a database driven site

If I try to connect to the ldap server via moodle software it returns the error LDAP-module cannot connect to any servers: Server: 'MYLDAPServer' 'Resource id #77', Bind result: ''

If I run php -m it lists ldap exactly like my other WHM server that is running ldap enabled drupal and moodle sites
I exported the apache build from the working server to the problem server but that didn't solve the problem either
 

mobcdi

Well-Known Member
Jul 13, 2009
109
0
66
Turned out to be a firewall down the line that was blocking comms between ldap and the WHM hosted accounts
 

mobcdi

Well-Known Member
Jul 13, 2009
109
0
66
AFAIK it doesn't come out of the box to allow ldap for the accounts the server hosts but it is possible if you include the necessary modules in php and the appropriate wordpress or drupal extension/module/plugin to enable ldap for client accounts

As for enabling ldap login to access cPanel itself I never tried to set it up but it would be useful. I don't think its possible and wouldn't even know where to start