Moodle - LDAP Authentication on Active Directory
On the Moodle server, install the required PHP module.
Restart the Apache service.
Open your browser and enter the IP address of your moodle server /moodle
In our example, the following URL was entered in the Browser:
The Moodle web interface should be presented, click on the Login option.
On the prompt screen, enter the administrative account login information.
After a successful login, the Moodle dashboard will be displayed.
Access the Site administration menu and select the Plugins tab.
On the Plugins tab, locate the Authentication area and select the option named Manage authentication.
Access the LDAP server settings.
On the LDAP Server settings area, perform the following configuration:
• Host URL - ldap://192.168.15.10
• Version - 3
• Use TLS - No
You need to change the IP address to your domain controller IP.
On the Bind settings area, perform the following configuration:
• Prevent password caching - Yes
• Distinguished name - CN=bind,CN=Users,DC=TECH,DC=LOCAL
• Password - kamisama123..
You need to change the bind credentials to reflect your Network environment.
On the User lookup settings area, perform the following configuration:
• User type - MS ActiveDirectory
• Contexts - dc=tech,dc=local
• Search subcontexts - Yes
• User attribute - samaccountname
• Member attribute - member
• Member attribute uses dn - 1
You need to change the domain information to reflect your Network environment.
On the System role mapping area, perform the following configuration:
• Manager context - CN=moodle-managers,CN=Users,DC=TECH,DC=LOCAL
• Course creator context - CN=moodle-creators,CN=Users,DC=TECH,DC=LOCAL
In our example, members of the Moodle-Managers group will have the administrative permission on the Moodle web interface.
In our example, members of the Moodle-Creators group will have permission to create courses on the Moodle web interface.
On the User account synchronisation area, perform the following configuration:
• Removed ext user - Keep internal
• Synchronise local user suspension status - No
On the Data mapping area, perform the following configuration:
• Data mapping (First name) - givenName
• Data mapping (Last name) - sn
• Data mapping (Email address) - mail
Click on the Save changes button to finish the configuration.