Note:

If you want to create a new page for developers, you should create it on the Moodle Developer Resource site.

testing LDAP on a Mac

From MoodleDocs
Revision as of 00:29, 1 May 2013 by Avindra Goolcharan (talk | contribs) (format page)


It was quite a battle to install a LDAP server on my mac and make it work with Moodle. Here are the steps for OpenDS in Mac OSX Lion:

  1. I had Moodle installed with Apache LDAP module installed too.
  2. I downloaded OpenDS for Mac and installed it. I changed the hostname for jerome.moodle.local. Which is translated into dc=jerome,dc=moodle,dc=local. I didn’t change cn= Directory Manager. I set the password to ‘admin’. Finally I selected to generate 5 users (if you missed out this step, you can uninstall and reinstall the server. That’s what I did when I ended up to have some difficulties to create a new user.).
  3. To test if the LDAP server was correctly installed I run the following command line (in OpenDS/bin folder): ./ldapsearch -h 127.0.0.1 -p 1389 -b uid=user2,ou=People,dc=jerome,dc=moodle,dc=local -D “uid=user2,ou=People,dc=jerome,dc=moodle,dc=local” -w admin “(objectClass=*)”
  4. I opended the control panel, and changed the user.2 username for user2. i also changed his password for ‘admin’.
  5. In the Moodle LDAP settings, I changed the following:
Host URL: 127.0.0.1:1389 (it didn’t work without the port LDAP number)
Distinguished name: uid=user2,ou=People,dc=jerome,dc=moodle,dc=local
Password: admin
Contexts: ou=People,dc=jerome,dc=moodle,dc=local (you need this entire linet, just ‘ou=People’ doesn’t work.)
User attribute: uid

Note: disconnect your computer from the network, otherwise the LDAP server could send requests everywhere and you could be banned.