+ Post New Thread
Results 1 to 12 of 12
Virtual Learning Platforms Thread, Help Setting up moodle -ldap in Technical; Hi All, Bit of a novice at this so go easy with. Setup a server 2008 with IIS 7. configured ...
  1. #1

    Join Date
    Feb 2011
    Posts
    92
    Thank Post
    6
    Thanked 24 Times in 15 Posts
    Rep Power
    12

    Help Setting up moodle -ldap

    Hi All,

    Bit of a novice at this so go easy with.

    Setup a server 2008 with IIS 7. configured PHP and included the ldap exstension. After tons of issues got moodle installed and its all setup i can access it. Now i cant for the life of me get the ldap to work. Ok so heres the background info for you.

    mysql version 5.5
    php ver 5.3.6
    Moodle Ver 1.9

    Now i have followed the instructions on the moodle.org website and still struggling.
    I have created a file called ldap.cong in C:\OpenLDAP\sysconf. inserted the line TLS_REQCERT never in the file.
    On the 2008 dc server which contains the AD i have installed CA servers. I could not install the enterprise version so had to go with the standalone option. As i have never done this before i have no idea what im doing and whether its done right or not. needless to say when i try and connect using LDP.exe on the dc to my moodle server running the ldap i get this error message:

    ld = ldap_sslinit("myldapservername", 636, 1);
    Error 81 = ldap_set_option(hLdap, LDAP_OPT_PROTOCOL_VERSION, 3);
    Error 81 = ldap_connect(hLdap, NULL);
    Server error: <empty>
    Error <0x51>: Fail to connect to myldapservername.

    I have tried using the IP and using port 389. Neither work.
    I have checked the Phpinfo and the ldap section is there with the following info :

    LDAP Support enabled
    RCS Version $Id: ldap.c 306939 2011-01-01 02:19:59Z felipe $
    Total Links 0/unlimited
    API Version 3001
    Vendor Name OpenLDAP
    Vendor Version 20319
    SASL Support Enabled

    Directive Local Value Master Value
    ldap.max_links Unlimited Unlimited


    Go easy as like i say ive not done all this before and really trying to get it to work. Really frustrated at this problem as i expect i have not done something simple due to my distinct lack of experience in this area.

    Cheers for any help
    Last edited by Chunks_; 29th March 2011 at 01:31 PM.

  2. #2
    sister_annex's Avatar
    Join Date
    Jan 2009
    Location
    Wolverhampton
    Posts
    604
    Thank Post
    102
    Thanked 142 Times in 123 Posts
    Rep Power
    51
    OK did this doc some time ago and not sure if it relates to 2008 but give it a go

    it is basically a list of how all the settings should look

    HTH
    Attached Files Attached Files

  3. #3
    sister_annex's Avatar
    Join Date
    Jan 2009
    Location
    Wolverhampton
    Posts
    604
    Thank Post
    102
    Thanked 142 Times in 123 Posts
    Rep Power
    51
    You may also which to check this tread too

    Moodle & LDAP

  4. #4

    Join Date
    Feb 2011
    Posts
    92
    Thank Post
    6
    Thanked 24 Times in 15 Posts
    Rep Power
    12
    Hi,

    Thanks for the quick reply. Ive had a read through and im pretty sure ldap is up and running on the same server as moodle.
    So now im starting to second guess myself which is not good at all. Could you confirm what server name do i need to put in the host section in moodle ? the ldap host i.e the moodle server as thats where its configured in the php.ini or the active directory with the Certificate Auth role ?

    How can i find out what these servers are doing when i run the auth_ldap_sync_users.php ? i cant find anything in any log that says whats going on ... any pointers as to where i might find at least some error codes to look at ? I have this as the phpwin.exe thingy attribute -f C:\inetpub\wwwroot\auth\ldap\auth_ldap_sync_users. php > c:\inetpub\wwwroot\admin\cron.log but nothing seems to appear in the cron.log

    Cheers for your assistance

  5. #5
    sister_annex's Avatar
    Join Date
    Jan 2009
    Location
    Wolverhampton
    Posts
    604
    Thank Post
    102
    Thanked 142 Times in 123 Posts
    Rep Power
    51
    LDAP is a query of your domain controller... The servername in an Active Directory case will be the IP address of your domain controller.

    You also need to make sure that the php_ldap extension is enabled in your php.ini file then restart iis

    The attached document is the full version of the earlier one which is the complete documentation as to how we set up our moodle. (note we use 2003, IIS 6 and MSSQL but the php settings etc should be the same)

    Binder1.pdf

  6. #6

    Join Date
    Feb 2011
    Posts
    92
    Thank Post
    6
    Thanked 24 Times in 15 Posts
    Rep Power
    12
    This is what phpinfo reports ... the extension is enabled in the php.ini and the server has been restarted.

    ldap
    LDAP Support enabled
    RCS Version $Id: ldap.c 306939 2011-01-01 02:19:59Z felipe $
    Total Links 0/unlimited
    API Version 3001
    Vendor Name OpenLDAP
    Vendor Version 20319
    SASL Support Enabled

    Directive Local Value Master Value
    ldap.max_links Unlimited Unlimited

    The thing is i cannot find any errors anywhere in regards to why this isnt working..... in moodle Host is the ip of my ad server with I used a program to check the Ldif of my users etc so thats fine. I checked the configs against your attached all seems pretty hunky dory so im at a loss.

  7. #7
    sister_annex's Avatar
    Join Date
    Jan 2009
    Location
    Wolverhampton
    Posts
    604
    Thank Post
    102
    Thanked 142 Times in 123 Posts
    Rep Power
    51
    Do you get the error in noodle when trying to log in?

    Can you login using any of you ad accounts?

  8. #8

    Join Date
    Feb 2011
    Posts
    92
    Thank Post
    6
    Thanked 24 Times in 15 Posts
    Rep Power
    12
    Dont think so ... tried one ..... i got this error...... i have tried this before and all i got was invalid username and password.... now i more recently im getting this ...
    LDAP-module cannot connect to any servers:
    Server: 'my server ip'
    Connection: 'Resource id #49'
    Bind result: ''

  9. #9
    sister_annex's Avatar
    Join Date
    Jan 2009
    Location
    Wolverhampton
    Posts
    604
    Thank Post
    102
    Thanked 142 Times in 123 Posts
    Rep Power
    51
    ah ok a bind result is usually a username or password error. have you put in the DN of your username and not just domain\username?

  10. Thanks to sister_annex from:

    Chunks_ (29th March 2011)

  11. #10

    Join Date
    Feb 2011
    Posts
    92
    Thank Post
    6
    Thanked 24 Times in 15 Posts
    Rep Power
    12
    Hi My username that im using is

    CN=ldap-User,OU=Service Accounts,OU=myschoolname,DC=domain,DC=domain,DC=do main,DC=domain

    I read somewhere you should use the display name for CN= is that correct ?? becuase here im using the actual username.

    Thanks for all your help so far

  12. #11

    Join Date
    Feb 2011
    Posts
    92
    Thank Post
    6
    Thanked 24 Times in 15 Posts
    Rep Power
    12
    Hi,

    I hit the jackpot..... changed it to the display name and then tried to login with a test student account and Viola...... ! Really appreciate all your help.

  13. #12
    sister_annex's Avatar
    Join Date
    Jan 2009
    Location
    Wolverhampton
    Posts
    604
    Thank Post
    102
    Thanked 142 Times in 123 Posts
    Rep Power
    51
    no worries... was just about to make sure you weren't putting CN=ldap-User,OU=Service Accounts,OU=myschoolname,DC=domain,DC=domain,DC=do main,DC=domain as this definately would not work lol

    glad i could help anyway



SHARE:
+ Post New Thread

Similar Threads

  1. LDAP Moodle
    By jamesda1 in forum Virtual Learning Platforms
    Replies: 0
    Last Post: 24th November 2010, 04:51 PM
  2. Moodle Ldap Help
    By acerf1 in forum Virtual Learning Platforms
    Replies: 2
    Last Post: 30th November 2009, 12:58 PM
  3. Moodle and LDAP
    By ahunter in forum Virtual Learning Platforms
    Replies: 6
    Last Post: 31st October 2008, 12:12 PM
  4. Moodle LDAP
    By zag in forum Virtual Learning Platforms
    Replies: 6
    Last Post: 17th July 2008, 11:12 AM
  5. Moodle and LDAP
    By GrumbleDook in forum Virtual Learning Platforms
    Replies: 10
    Last Post: 28th March 2007, 05:02 PM

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •