Jump to content

Recommended Posts

Posted (edited)

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:

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

Edited by Chunks_
Posted

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

Posted

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

Posted

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. :(

Posted

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: ''

Posted

Hi My username that im using is

 

CN=ldap-User,OU=Service Accounts,OU=myschoolname,DC=domain,DC=domain,DC=domain,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

Posted

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.

Posted

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=domain,DC=domain as this definately would not work lol

 

glad i could help anyway :D

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...