Re: batch change user authentication to LDAP
Hello.
Do you have DB admin access? Which DB product do you use: MySQL, PostgreSQL?
If so, you can run an update query for all records in users table.
Let me know.
Re: batch change user authentication to LDAP
Re: batch change user authentication to LDAP
Hello again.
You mentioned you had uploaded users before. Can you erase those you want to have LDAP authentication and they exists in your text file?
If YES, then change the text file so you add a new field called 'auth'. Add it between required fields and default fields.
username, password, firstname, lastname, email, auth, .... idnumber, icq, phone1, ...
Then assign to those users you want LDAP authentication a value of 'ldap' for 'auth' field.
username, password, firstname, lastname, email, auth, .... idnumber, icq, phone1, ...
myuser1, itspwd1, One user, to test, anemail@emailsvr.dom, ldap, .... 4, 456213, 5557634599, ...
If NO, then I am afraid you must go under and directly to MySQL syntax. For this case YOU HAVE TO BE EXTREMELY CAREFUL. Query your mdl_user table and identify which ids you have to UPDATE. Maybe a range or a point to start is what you will figure out. (DO YOU HAVE A BACKUP? )
Then, run something like:
update mdl_user set auth = 'ldap' where id > pointtostart;
or
update mdl_user set auth = 'ldap' where id > lowervalue and id < uppervalue;
where pointtostart is the id number in your DB where your users counting starts, I mean, the lower number assigned to the first user you want to change. BE CAREFUL, because id 1 and id 2 are UNTOUCHABLE (guest and ADMIN users).
lowervalue and uppervalue is for a range of ids.
Are there any other kind of user (teachers, tutors)? Identify pretty well whose you really want to set LDAP authentication.
Good luck. Be careful, be careful.