moodle can not sync with ldap

moodle can not sync with ldap

by Frank Uccello -
Number of replies: 4

I have the following

OS: CentOS 7

moodle version 3.2

php  version 5.6.30


the ldap config is:

Host URL: 10.1.1.1 (IP of domain controller)

Version: 3

LDAP encoding: utf-8

Bind settings

Hide passwords: yes

Distinguished name: CN=regularuser,OU=users,DC=mydomain,DC=com (account with permission to read users in AD)

Password: password

User lookup settings

User type: MS ActiveDirectory

Contexts: DC=mydomain,DC=com

Search subcontexts: yes

Deference aliases: no


NTLM SSO

Enable: yes

Subnet: 10.0.0.0/24

MS IE fast path?: no

Authentication type: NTLM


When I try login as AD User  I get the error : LDAP-module cannot connect to any servers: Server:  Connection: 'Resource id #12', Bind result

please help

Average of ratings: -
In reply to Frank Uccello

Re: moodle can not sync with ldap

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

Bind user error normally points to one of two things - 1.  Bind user is not entered correctly or does not have appropriate permissions 2. Context is entered wrongly.

There is a utility called ldap.exe that you can google.  You run it from a windows pc but it will give you more detailed info on where your problem is.

In reply to Emma Richardson

Re: moodle can not sync with ldap

by Frank Uccello -
is there something similar to ldap.exe for CentOS Linux


In reply to Frank Uccello

Re: moodle can not sync with ldap

by Ken Task -
Picture of Particularly helpful Moodlers

Install webmin.  It's an open sourced cPanel for Linux servers.   Runs it's own web service off a higher port of your choosing.  Can limit access to webmin to cartain IP addresses or IP address ranges.   And it has tools to help admin the server ... one is a module for LDAP ... that allows you to (once configured with proper bind credentials) browse the entire LDAP 'tree'.

Other than that, one could install openldap which contains command line tools ... ldapsearch ... which are less user friendly than webmin.

Download tar.gz to your server.

http://www.webmin.com/

'spirit of sharing', Ken


In reply to Ken Task

Re: moodle can not sync with ldap

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

I was excited to see in 3.3 there is actually a Moodle LDAP connection test.  My LDAP server works so not sure what error messages it might throw but it does at least tell you if it connecting properly!  The ldap.exe is a pain to have to run from a windows device but it does give you good information.  Just run it off some pc in your network.