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: Difference between revisions

From MoodleDocs
m (Text replacement - "</code>" to "</syntaxhighlight>")
(Note about plan not to migrate this page to the new developer resources. See template for more info.)
 
Line 1: Line 1:
{{Template:WillNotMigrate}}
{{stub}}
{{stub}}



Latest revision as of 13:47, 24 June 2022


Warning: This page is no longer in use. The information contained on the page should NOT be seen as relevant or reliable.



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.