LDAP error after install

LDAP error after install

by Jerry Lau -
Number of replies: 11

This is strange... I updated my 1.9.6 to 2.0.3 and all looks to fine until I tried to log in via LDAP. And now I am getting the following error

------------

LDAP-module cannot connect to any servers: No LDAP Host URL, Version or User Type specified in your LDAP settings

------------

I checked my mdl_config_plugins table and the correct settings are already there.

What could be wrong?

 

 

 

Average of ratings: -
In reply to Jerry Lau

Re: LDAP error after install

by Jason Fehr -

I had a similar problem with 1.9 and had to manually change the "enrol_ldap_host_url" entry in the mdl_config database table. This isn't nessasarly the same solution, but I know it took me forever to track down.

In reply to Jason Fehr

Re: LDAP error after install

by Jerry Lau -

Hi Jason,

Not sure what you mean by manually changing it... from what to what?

I check the mdl_config table and can't find that column you are referring to

In reply to Jerry Lau

Re: LDAP error after install

by Jason Fehr -

If you don't have the entry in your database I'm not sure if my advice is going to help. I did, and when I changed if from my old LDAP server IP address to my new LDAP IP address everything began working again.

I'm not sure if just adding it to the table would be a good idea there are a number of different LDAP settings in there. Maybe the version you started with didn't require these settings. Sorry I couldn't be more helpful.

In reply to Jason Fehr

Re: LDAP error after install

by Jerry Lau -

Did you start with a new database? or did you use an exisiting one?

Maybe I'll see the differences if a use an empty database and see it that field exists in the new one (mdl_config NOT mdl_config_plugins)

strange ...

In reply to Jerry Lau

Re: LDAP error after install - found solution

by Jerry Lau -

I figured it out!

Hope this help others. I used a blank database to compare ... I am using AD.

In the user_attribute field in my mdl_config_plugins, I had sAMAccountName as the value. I notice that in the blank one, I did not need to have entered it and viola it works!

So for AD, you don't need to use sAMAccount Name as it will automatically use/pick up the CN...

phew ... bug perhaps ? =)

In reply to Jerry Lau

Re: LDAP error after install - still errors - spoke too soon

by Jerry Lau -

 

Yikes.. I spoke too soon..

The error is still there if I use my existing database.

This is weird.

------

LDAP-module cannot connect to any servers: No LDAP Host URL, Version or User Type specified in your LDAP settings

More information about this error


Not sure what is causing this now ...

In reply to Jerry Lau

Re: LDAP error after install - still errors - spoke too soon

by Jerry Lau -

bump ....

Anyone have any ideas? I can't get this to work using my existing database...

In reply to Jerry Lau

Re: LDAP error after install - still errors

by Jerry Lau -

This is very frustrating.

Still did not get this to work. I took my database from 1.9.6 and using mysqldump, i created a new database for 1.9.12 and then to 2.1. The table is there with all the field values but it's saying that the LDAP-module cannot connect to any servers. I know the LDAP is working fine because the 2.1 application is on the same server as the one with the working 1.9.12 but not for 2.1.

Why is it so difficult? sad

 

In reply to Jerry Lau

Re: LDAP error after install

by Jerry Lau -

I wrote a simple script to see if it binded and it was successful.. that means connection to it is fine.

It's moodle that has a problem.

Could it be that part of my dn has a quote on it? Why would it not work on 2.0.3 but works on 1.9.6?

Here is my mdl_config_plugin field setting for bind_dn

39 | auth/ldap | bind_dn| CN=admin_ldap,OU=administrators,OU="user accounts",DC=test,DC=com

Thanks

 

 

 

In reply to Jerry Lau

Re: LDAP error after install

by Stefan Nychka -

I don't know.  I haven't dealt much with setting up LDAP.

Did some searching, and the following may be useful if you haven't yet solved this or come across them: