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

LDAP settings test better diagnostic

XMLWordPrintable

    • MOODLE_35_STABLE
    • MOODLE_37_STABLE
    • MDL-64071-master
    • 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."  

      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.

        1. MDL-64071.jpg
          31 kB
          Anna Carissa Sadia

            aulaweb AulaWeb Università di Genova
            aulaweb AulaWeb Università di Genova
            Damyon Wiese Damyon Wiese
            Eloy Lafuente (stronk7) Eloy Lafuente (stronk7)
            Anna Carissa Sadia Anna Carissa Sadia
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved:

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

                  Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.