Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-64071

LDAP settings test better diagnostic

    XMLWordPrintable

    Details

    • Testing Instructions:
      Hide

      Enable the LDAP auth plugin.

      Edit the ldap settings like this...

      Host URL: ldap://ldap.forumsys.com/

      Distinguished name: cn=read-only-admin,dc=example,dc=com

      Password: password

      Contexts: dc=example,dc=com

      User attribute: uid

       

      Now visit the test ldap page (admin/settings.php?section=manageauths => "Test settings" for the LDAP row)

      1. Verify you see: "Connecting to your LDAP server was successful"

       

      Now change the Host URL to something that doesn't exist.

      Now visit the test ldap page.

      2. Verify you see an error like "LDAP-module cannot connect to any servers: Server: 'ldap://ldap.forumsys.com.nope/', Connection: 'Resource id #851', Bind result: ''

       Change the Host URL back and change the version from 3 to 2. Remove the "Distinguished name" and "password" settings.

      Now visit the test ldap page.
      3. Verify you see an error like "Its is very unlikely a modern LDAP server uses LDAPv2 protocol. Wrong settings can corrupt values in user fields. Check with your LDAP administrator.
       
      Change the version back to 3 and add 2 semicolons at the end of the "Contexts" setting.
      Now visit the test ldap page.
      4,  Verify you see an error like "Empty context found."
       

      Show
      Enable the LDAP auth plugin. Edit the ldap settings like this... Host URL: ldap://ldap.forumsys.com/ Distinguished name: cn=read-only-admin,dc=example,dc=com Password: password Contexts: dc=example,dc=com User attribute: uid   Now visit the test ldap page (admin/settings.php?section=manageauths => "Test settings" for the LDAP row) 1. Verify you see: "Connecting to your LDAP server was successful"   Now change the Host URL to something that doesn't exist. Now visit the test ldap page. 2. Verify you see an error like "LDAP-module cannot connect to any servers: Server: 'ldap://ldap.forumsys.com.nope/', Connection: 'Resource id #851', Bind result: ''  Change the Host URL back and change the version from 3 to 2. Remove the "Distinguished name" and "password" settings. Now visit the test ldap page. 3. Verify you see an error like "Its is very unlikely a modern LDAP server uses LDAPv2 protocol. Wrong settings can corrupt values in user fields. Check with your LDAP administrator.   Change the version back to 3 and add 2 semicolons at the end of the "Contexts" setting. Now visit the test ldap page. 4,  Verify you see an error like "Empty context found."  
    • Affected Branches:
      MOODLE_35_STABLE
    • Fixed Branches:
      MOODLE_37_STABLE
    • Pull from Repository:
    • Pull Master Branch:
      MDL-64071-master

      Description

      Current version of LDAP plugin has a very poor diagnostic.
      This patch add some other checks with explanations useful for administrators not experienced to LDAP.

        Attachments

          Activity

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Fix Release Date:
                20/May/19

                Time Tracking

                Estimated:
                Original Estimate - 0 minutes
                0m
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 1 hour
                1h