LDAP Auth after upgrade from 1.9 to 2

LDAP Auth after upgrade from 1.9 to 2

by Allan Kealey -
Number of replies: 13

I have upgraded my moodle from 1.9 to 2 and the LDAP auth against my AD has stopped working.  I have not changed any of the settings, shown below but it fails to authenticate

 

 

 

Has any one come across this before and is there a fix or have I missed something.

Average of ratings: -
In reply to Allan Kealey

Re: LDAP Auth after upgrade from 1.9 to 2

by Paul Holden -
Picture of Core developers Picture of Moodle HQ Picture of Moodle Workplace team Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers Picture of Testers

I had something similar happen during daily upgrades of Moodle 2 - it seems that at some point the name of the configuration field that stores the LDAP version number changed names, which prevented LDAP logins working.

Really simple fix was to go the LDAP settings page (as above) and just hit the Save Changes button at the bottom, which updated the field name and subsequently allowed LDAP logins to work again approve

In reply to Paul Holden

Re: LDAP Auth after upgrade from 1.9 to 2

by Allan Kealey -

Hi

Thanks for that.  I have tried this and it still doesn't work.  What else could have changed.  The only thing that seems to have changed in the help/notes page is the notes by the side of the 'distinguished name' option

I use moodle@tibshelf.local and it worked before.

Confused

In reply to Allan Kealey

Re: LDAP Auth after upgrade from 1.9 to 2

by Jason Turnbull -

Hi Allan,

I got caught out by this too.

For me, it was becuase of the way I was running the LDAP sync script. I have it set up in a batch file that is triggered by Windows Task Scheduler.

This is the equivalent of running the script from the command line.

In Moodle 2.0, there are now specific scripts to use with the command line interface, which are located in 'cli' directories. For LDAP it's 'moodle\auth\ldap\cli\sync.php'

Depending on how you are triggereing the LDAP sync, this path will need to be updated.

In reply to Jason Turnbull

Re: LDAP Auth after upgrade from 1.9 to 2

by Allan Kealey -

Sorry to appear thick but I never knowingly triggered any script.  I just filled in the form and it worked.  Where is this script and where is it documented?  I have read a lot of posts about this process and never come across anything mentioning this.  Could you clarify this post pleaseapprove

Thanks

In reply to Allan Kealey

Re: LDAP Auth after upgrade from 1.9 to 2

by William Lu -
Picture of Particularly helpful Moodlers

I have the same problem.

I upgraded from 1.9.7, the LDAP stop working.

Then I created a new Moodle2.0 site, the LDAP not working either.

I'ce campared all seeting field, nothing has been changed.

Looks like the Moodle2.0 not finished yet.

Please anyone give a clue.

Thanks

In reply to William Lu

Re: LDAP Auth after upgrade from 1.9 to 2

by Iñaki Arenaza -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
Do you get any errors in your PHP error logs?

Saludos.
Iñaki.
In reply to Iñaki Arenaza

Re: LDAP Auth after upgrade from 1.9 to 2

by Allan Kealey -

I haven't seen any php errors but I cannot open the error file, Too Big wink

I have recreated the error log file and the only errors I get are from Gallery Version 2 nothing to do with Moodle at all

Allan

In reply to William Lu

Re: LDAP Auth after upgrade from 1.9 to 2

by William Lu -
Picture of Particularly helpful Moodlers

LDAP is working properly now.

In LDAP server settings page:

Under the second area: Bind settings

Hide passwords is Yes, Distinguished Name and Password are filled (I think it is the default setting).

Change it from Yes to No, and save. The two pre-filled fields are empty now.

Test login by a LDAP account, all are working as normal.

In reply to William Lu

Re: LDAP Auth after upgrade from 1.9 to 2

by Allan Kealey -

I tried this and it still doesn't work.

I changed the Hide passwords to No and saved the changes, the 2 boxes did not clear so I emptied them and saved the changes.  Niether a logon or SSO worked with a LDAP account.  All the php errors have nothing with Moodle.

In reply to Allan Kealey

Re: LDAP Auth after upgrade from 1.9 to 2

by Jerry Lau -

I have the same problem too now ... does not work with 2.0.3 (June 12, 2011 release)

works with 1.9.6 and the mdl_config_plugins are the same.

 

In reply to Jerry Lau

Re: LDAP Auth after upgrade from 1.9 to 2

by Iñaki Arenaza -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

In 1.9.6, mdl_config_plugins should have a record like this:

'some-number-here', 'auth/ldap', 'version', '3'

In Moodle 2.0.x, you should have two records like these:

'some-number-here', 'auth_ldap', 'version', '2010072600'
'some-number-here', 'auth/ldap', 'ldap_version', '3'

and there shouldn't be a row like this:

'some-number-here', 'auth/ldap', 'version', '3'

If there is, you should delete it.

Saludos. Iñaki.

In reply to Iñaki Arenaza

Re: LDAP Auth after upgrade from 1.9 to 2

by Suzie Pittman -

I originally started with Moodle 2.0 and LDAP worked, I upgraded to 2.0.3 and now LDAP doesnt work. Did anyone find a solution?

Thanks