LDAP Enrollment issue

LDAP Enrollment issue

by Kent Villard -
Number of replies: 5
Hi folks,

I'm trying to get LDAP enrollment working in Moodle 1.9 based on what was shown here:
http://moodle.org/mod/forum/discuss.php?d=31761

I have an LDAP server running with the info from the LDIF supplied with that post. If I login the Moodle I get my account created (via LDAP authentication) but no courses are created or enrollments completed.

When I run ldap_enrol_synch.php from the command line I get this:
------------------------------------------------------------
== Synching Math101
Creating Course Math101...OK!
Could not find user teachera, skipping
== Synching Eng201
Creating Course Eng201...OK!
Could not find user teachera, skipping
Could not find user teacherb, skipping
== Synching Math101
Could not find user studentd, skipping
Could not find user studente, skipping
== Synching Eng201
Could not find user studente, skipping
Could not find user studentf, skipping
------------------------------------------------------------

So for some reason, although it can create the courses just fine this way, it is not finding the teachers or students. I'm not sure what is wrong - this is what I have set in the LDAP enrolment plugin:

Role Mapping
LDAP Contexts
Teacher: ou=TeacherEnrollment,dc=ldap,dc=server
LDAP Member Attribute
memberuid

LDAP Contexts
Student: ou=StudentEnrollment,dc=ldap,dc=server
LDAP Member Attribute
memberuid

Course enrolment settings:
enrol_ldap_objectclass: posixGroup
enrol_ldap_course_idnumber: cn
enrol_ldap_course_shortname: cn
enrol_ldap_course_fullname: cn

And I have enrol_ldap_autocreate set to yes

Can anyone suggest what may be wrong with my setup? I would appreciate any advice. I posted at the bottom of the other post but hopefully it will be more visible here.

thanks for you help.
Average of ratings: -
In reply to Kent Villard

Re: LDAP Enrollment issue

by Kent Villard -
If only I had found this before I posted smile - Anyhow, it would seem that the problem is that the idnumber field is not getting population when the accounts are created by LDAP authentication. Anyone have any ideas why this might usually happen - where do I map an LDAP entry to the idnumber?
In reply to Kent Villard

Re: LDAP Enrollment issue

by David Sweigert -

Did you ever get this to work?

I am in a similiar situation where I want my STUDENTS (who are nested in an OU in Active Directory) to automatically be seen as the ROLE of STUDENT at log in and I want my TEACHERS to be seen as TEACHERS.

Am I wrong on this concept?

Thanks in advance.

Dave

In reply to Kent Villard

Re: LDAP Enrollment issue

by joe vieira -
Are the teachers and students users in moodle already? make sure your ldap authentication module is working correctly.


In reply to joe vieira

Re: LDAP Enrollment issue

by David Sweigert -

Nobody is in the system yet as anything except for administrators, course creators.  And LDAP lets me log in and shows me the particulars about the account.  I did discover something about mapping ID numbers in Moodle to the UID in LDAP/AD.  Any clue what that means.  I'll gladly share screen shots, whatever.

In reply to David Sweigert

Re: LDAP Enrollment issue

by joe vieira -
Okay so you need to determine how you map your users between groups and their user record in ldap/ad (what ldap are you using?)

once you know how you map between user accounts and groups; you will want to use that attribute as your "id number" in the ldap authentication module.

you NEED to have the ldap auth module working BEFORE the enrolment module.

Joe