Hello all,
I've just become aware of an LDAP authentication issue on our Moodle site. I've been running LDAP authentication for a couple of years now with no issues. It became apparent that some accounts had not been created (as students were unable to login) and upon investigation, I noticed the LDAP users sync job has not run since June 5th.
Normally, the bulk of our accounts are created, via LDAP, each year in late March (approximately 1,000 users each year). There are a few special cases (international students) via which accounts are created at other times. The inability to create these 'special' accounts is what brought this issue to the surface for us. I attempted to run the script manually from the Scheduled tasks page and get the following error:
Scheduled task failed: LDAP users sync job (auth_ldap\task\sync_task),Error writing to database Debug info: Duplicate entry '1-samplename' for key 'mdl_tmpextu_mneuse_uix' INSERT INTO mdl_tmp_extuser (username,mnethostid) VALUES(?,?) [array ( 0 => 'samplename', 1 => '1', )]I've changed the actual username to 'samplename'. The account, 'samplename' is one that has been present on the Moodle site for some time (several years). I do not have access to the LDAP server but suspect there may, for some reason, be duplicate entries in the LDAP server. Is that suspicion warranted? And, is there any additional testing I can do on the Moodle site (server) to further track this problem (without access to the LDAP server)?
Thanks in advance for any help that is provided.
Regards
Jason
P.S. I am running Moodle 3.3+ Also, there is no information in my database (MySql) error log that might be helpful (actually no errors at all).