Moodle LDAP Problem.

Moodle LDAP Problem.

by Zak Fleming -
Number of replies: 10

Hi,

I have had a problem for a while, and I have got back to sorting. I have setup and configured LDAP in Moodle. We have an active directory test account called “07test” This account logs into Moodle fine without any problems at all. But our student accounts do not work. The test account is configured the exact same way as our normal student accounts. The only difference between the two is the username convention. This is an example of a student username: T065JohnS.

If I create a new account using the same username format as the students it does not work, but the 07test account does. I have created other account called “04test” “05test” “06test” these also work perfectly.

The problem when they try to login is that is gives them a message saying invalid username or password.

We are running the latest version of Moodle weekly release.

Server details:

Dell Poweredge 2900 - Windows Server 2008 Enterprise x64 SP2
Web server is Apache.
MySQL

Does anyone have any thoughts please?

I will attach my LDAP settings shortly.

Thanks allot.

Average of ratings: -
In reply to Zak Fleming

Re: Moodle LDAP Problem.

by Howard Miller -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
As Moodle auth doesn't give particularly helpful error messages, go and find a LDAP browser and try some searches on your Moodle server. If that doesn't work either it will probably be easier to diagnose before moving to Moodle.
In reply to Howard Miller

Re: Moodle LDAP Problem.

by Zak Fleming -

It’s not a communication problem, the server can see LDAP and the other servers. It will allow a login with my test accounts so I think it will be a moodle pacific problem.

Zak

In reply to Zak Fleming

Re: Moodle LDAP Problem.

by Zak Fleming -
Does anyone else have any input please?

I can create usernames in the broken locally on the moodle and they work fine. Just still broken for LDAP.

Who ever comes up with the answer that fixes it will get lots of beer smile

Thanks
In reply to Zak Fleming

Re: Moodle LDAP Problem.

by Howard Miller -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
The only other thing(s) I can suggest is to turn up Debugging as far as it will go and also to be experiment with your contexts. I had found AD/PHP to be fussy about the contexts presented to it. Even though you specify recursive search it sometimes doesn't work properly. Go one deeper (and more of them, obviously) with your contexts sometimes makes the difference.

I would also check the logs on the AD LDAP server too. That might give you a clue if it is rejecting the request.
In reply to Howard Miller

Re: Moodle LDAP Problem.

by Zak Fleming -
Thanks for the reply. I have done a few things since.

1. Setup a brand new install on a virtual machine. The VM is running Windows Server 2008 Enterprise. The webserver is using IIS7. I have installed and congiured PHP & Mysql. Installed the weekly release of Moodle.

The problem still happens.

2. Enabled Debugging to developer and it doesn't show anything when i try to logon.

3. In the LDAP server i can see evens when the test account are approved access. But it doesn't show a thing for the student accounts.

The LDAP server is Running Windows Server 2008 Enterprise and we have 5 DC's in the domain. The domain function level is Server 2008.

I have attached the PHP & LDAP config if this helps at all.

Many Thanks for your support.

Zak
In reply to Zak Fleming

Re: Moodle LDAP Problem.

by Howard Miller -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
I always get a sinking feeling when someone mentions they are running on Windows. Banging your head against the nearest brick wall might be a similarly rewarding experience tongueout

I had a quick Google around and it looks less than straightforward making LDAP/PHP support work on a Windows server. For example...

http://forums.devshed.com/showthread.php?p=1173879

Have you done this stuff?
In reply to Howard Miller

Re: Moodle LDAP Problem.

by Zak Fleming -
smile

I have edited a point above - "in the LDAP server i can see evens when the test account are approved access. But it doesn't show a thing for the student accounts."

With the link do you mean copying the .dll files? I didn't think i needed to do this as i have enabled LDAP on my moodle server and specified in the PHP file that the extension directory is C:\php\ext

The actual LDAP in PHP is enabled.
In reply to Howard Miller

Re: Moodle LDAP Problem.

by Zak Fleming -