LDAP authentication to Active Directory

LDAP authentication to Active Directory

by Mike Kowalski -
Number of replies: 4

hello !


I have installed Moodle 3.6 and can not connect it to active directory (windows 2008 functional level)

Also I have test with other domains on windows 2016 and it works fine but i have problem with this one domain

When i try login via ad user credentials moodle show a message:

Connection: 'Resource id #19', Bind result: "

ldap://10.10.10.100

bind_dn: CN=Administrator,CN=Users,DC=test,DC=com,DC=pl

bind_pw: password_for_Administrator

User type= MS Active Directory
Dereference aliases = No
Contexts = OU=vip,DC=test,DC=com,DC=pl
Search subcontexts = yes
User attribute = samaccountname

Please help!

Average of ratings: -
In reply to Mike Kowalski

Re: LDAP authentication to Active Directory

by Jon Bolton -
Picture of Particularly helpful Moodlers Picture of Testers

From memory, I think that code has something to do with  TLS. Your connection IP is ldap - have you tried ldaps?

I must stress that this is from memory and I have no way of checking it for a few days, but hopefully someone will be able to help you soon.

In reply to Jon Bolton

Re: LDAP authentication to Active Directory

by Mike Kowalski -
I tried with ldap and ldaps. the problem is still the same ....
In reply to Mike Kowalski

Re: LDAP authentication to Active Directory

by Emma Richardson -
Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Plugin developers

Bind result normally is due to a couple of reasons (normally nothing to do with ldap/ldaps).

1.  Your bind user credentials are wrong (I know, but check them anyway and reenter in case you have some errant space or something!)

2.  There is a problem with the context.  Either it is incorrectly entered or your bind user does not have the necessary permissions on that OU.

In reply to Emma Richardson

Re: LDAP authentication to Active Directory

by Mike Kowalski -

Thanks for reply ,


My bind credentials are ok because when I use ldp.exe i can bind this user and view this OU. (I copied DN from active directory)

This is very strange problem. I've looked through the whole forum and documentation and can not find a solution.

I implemented moodle on other domains and there was no problem with the LDAP connection. This domain has a lot domain objects - about 1000 - maybe this is a problem)


thanks a lot for help