by Nadirshah Ferozepurwalla.
Hello,
Similar Problem discussed below link, but here I am using samaccountname!
(https://moodle.org/mod/forum/discuss.php?d=215144#p948360)
Why am I getting a duplicate username error when filling the temp table using sync script when my usernames are basically samaccountnames which are by default unique throughout the AD
or am I missing something here? what changes should I make in moodle ldap settings?
Details
User type: MS Active Directory
Contexts: dc=(organization),dc=edu
User attribute: samaccountname
Object class: (&(objectclass=user)(!(objectclass=computer)))
Error
Scheduled task failed: LDAP users sync job (auth_ldap\task\sync_task),Error writing to database Debug info: Duplicate entry '1-krbtgt' for key 'mdl_tmpextu_mneuse_uix' INSERT INTO mdl_tmp_extuser (username,mnethostid) VALUES(?,?) [array ( 0 => 'krbtgt', 1 => '1', )] Backtrace: * line 1259 of \lib\dml\mysqli_native_moodle_database.php: call to moodle_database->query_end() * line 1050 of \auth\ldap\auth.php: call to mysqli_native_moodle_database->insert_record_raw() * line 728 of \auth\ldap\auth.php: call to auth_plugin_ldap->ldap_bulk_insert() * line 50 of \auth\ldap\classes\task\sync_task.php: call to auth_plugin_ldap->sync_users() * line 75 of \lib\cronlib.php: call to auth_ldap\task\sync_task->execute() * line 81 of \admin\cron.php: call to cron_run()
Thankyou for the help,