Virtual Learning Platforms Thread, Moodle + LDAP authentication + cron in Technical; I'm well on my way with my first Moodle installation on Windows.
I've worked through LDAP authentication - MoodleDocs and ...
13th December 2011, 01:24 PM #1
Moodle + LDAP authentication + cron
I'm well on my way with my first Moodle installation on Windows.
I've worked through LDAP authentication - MoodleDocs and set up LDAP.
New user accounts are not being created. If I log on as a new user, I just get "Invalid login, please try again", no other errors are displayed.
I thought that will LDAP configured, Moodle would look up new users when they try to log on and set up their accounts as necessary - is this not right?
I think I'm supposed to set up a cron job to automate LDAP synchronisation. I've installed MoodleCron, and it appear to be working, runing the standard cron job.
How do I add another cron job to sync LDAP?
13th December 2011, 03:38 PM #2
do you mean new ad users are not working in moodle?
or the other way around? new moodle users don't work in ad?
13th December 2011, 03:50 PM #3
No AD users are working in Moodle. If I look at Home/ ► Site administration/ ► Users/ ► Accounts/ ► Browse list of users, it shows only the two accounts I set up manually.
Originally Posted by glennda
I can create new users in AD, then try to log on with those credentials in Moodle, it says "Invalid login, please try again". I expected it to look them up in AD and create the account.
13th December 2011, 03:58 PM #4
what type of account are you using to bind the account? do you get any errors in the apache error log?
Do you have the ldap php plugin installed?
13th December 2011, 03:58 PM #5
Moodle will look up the accounts in AD and create where necessary, so it sounds to me that you haven't got your LDAP configured correctly.
13th December 2011, 04:16 PM #6
Originally Posted by glennda
The account was a standard user. I've changed it to a member of domain admins, but it didn't make any difference. I've entered the name in the form "CN=Moodle LDAP,CN=Users,DC=domain,DC=local"
I'm running it on IIS, not Apache, as I installed it via the MS Web Platform Installer.
I've installed the ldap php plugin. The LDAP Server page won't appear without it.
Last edited by OverWorked; 13th December 2011 at 04:20 PM.
13th December 2011, 04:18 PM #7
I agree. But I've worked carefully through the Moodle Docs and can't see what's wrong.
Originally Posted by Hightower
13th December 2011, 04:23 PM #8
Ok, well I presume IIS still needs to have the PHP module for Ldap (I've never used IIS)
Originally Posted by OverWorked
is the Ldap entry correct for where the moodle user is? what ou is the user in?
If you go to View with AD open select advanced features and open properties of the moodle bind user account you can select attribute editor and then you should be able to see the full DN name so you can paste this in. (see attached)
Also do you have the Search Sub-context's selected to yes? as this will then search the sub ou's within the main ou selected.
Thanks to glennda from:
OverWorked (13th December 2011)
13th December 2011, 04:44 PM #9
The LDAP entry for the Moodle user is correct. I'd already copied the full DN from the attribute editor so I could be sure of getting it right.
Search sub contexts is 'yes'.
The Moodle bind user is in a different OU to the rest of the users (set in contexts, 3 lines down). Should this make a difference?
I can manually run sync_users.php, and it returns:-
Connecting to LDAP server... Creating temporary table tmp_extuser .................................................. .............................. .................................................. ..................!!! Error writing to database !!!
This suggests (to me) that Moodle is connecting to AD, but there's another problem afterwards.
13th December 2011, 05:36 PM #10
I am so embarrassed.
I was using the wrong password for the test account. Moodle was correctly reporting "Invalid login, please try again", with no other errors.
I've wasted two hours on this, and your time too. I need a break.
(It doesn't explain the error running sync_users.php manually, but that's something else).
I really am sorry. I was just stuck in a groove and not thinking of the full problem.
Last edited by OverWorked; 13th December 2011 at 05:40 PM.
13th December 2011, 07:14 PM #11
Don't worry! we all do stupid things once in a while, i was remote desktoped onto a server earlier and accidentally rebooted it instead of my machine!!! From the command line so not even got the option to cancel!
By apearce in forum Virtual Learning Platforms
Last Post: 18th October 2011, 12:33 PM
By Chunks_ in forum Learning Network Manager
Last Post: 19th July 2011, 12:59 PM
By Hightower in forum Virtual Learning Platforms
Last Post: 25th January 2010, 07:04 PM
By reggiep in forum Virtual Learning Platforms
Last Post: 5th January 2010, 09:33 PM
By FN-GM in forum Virtual Learning Platforms
Last Post: 25th May 2008, 12:58 PM
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Tags for this Thread