OverWorked Posted December 13, 2011 Posted December 13, 2011 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?
glennda Posted December 13, 2011 Posted December 13, 2011 do you mean new ad users are not working in moodle? or the other way around? new moodle users don't work in ad?
OverWorked Posted December 13, 2011 Author Posted December 13, 2011 do you mean new ad users are not working in moodle? or the other way around? new moodle users don't work in ad? 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. 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.
glennda Posted December 13, 2011 Posted December 13, 2011 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?
Hightower Posted December 13, 2011 Posted December 13, 2011 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.
OverWorked Posted December 13, 2011 Author Posted December 13, 2011 (edited) 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? Thanks. 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. Edited December 13, 2011 by OverWorked
OverWorked Posted December 13, 2011 Author Posted December 13, 2011 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. I agree. But I've worked carefully through the Moodle Docs and can't see what's wrong.
glennda Posted December 13, 2011 Posted December 13, 2011 Thanks. 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. Ok, well I presume IIS still needs to have the PHP module for Ldap (I've never used IIS) 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. 1
OverWorked Posted December 13, 2011 Author Posted December 13, 2011 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? Update:- 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.
OverWorked Posted December 13, 2011 Author Posted December 13, 2011 (edited) 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. Edited December 13, 2011 by OverWorked
glennda Posted December 13, 2011 Posted December 13, 2011 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!
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now