LDAP changing to Manual

LDAP changing to Manual

by Andrew Fisher -
Number of replies: 3
Hi,

I am a new user to please be gentle..We have noticed lately that some of our student accounts have changed from LDAP to Manual and we are having to change each one back to LDAP. Is there a way we can do this in bulk or a script we can run to ensure LDAP is in place for all students.??

Andy


Average of ratings: -
In reply to Andrew Fisher

Re: LDAP changing to Manual

by Emma Richardson -
Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Plugin developers

1.  Why are they changing - I would guess that someone is using csv to upload users into courses and is not adding the auth column with ldap filled for each user.

2. Couple of ways - quickest would be to run a script on the database that updates all users with an id greater than 2 (this then excludes the guest and admin users) and with manual authentication to ldap authentication.  You will need a little mysql knowledge and access to the database through Adminer or PHPMyAdmin.

3.  If you only have access to the web interface, use the filter feature to find all your manual authentication users and download them to a csv file.  Then take this file, change manual to ldap, and use it to upload the users back in using user import.  You can delete a lot of the columns out - you basically just need username, email and auth columns.  Make sure you select the option to update existing users and that should take care of it.

Average of ratings: Useful (1)
In reply to Emma Richardson

Re: LDAP changing to Manual

by Ken Task -
Picture of Particularly helpful Moodlers

+1 to Emma's posting ... and a caution/suggestion ... check that CSV file before importing users.   Make sure that admin level users in Moodle are set to manual - at least two users with known logins/passwords.

'spirit of thinkering', Ken

In reply to Emma Richardson

Re: LDAP changing to Manual

by Andrew Fisher -

Hey Emma,


Thanks so much for your help. I will have another look at it and see what I can do using your advice...

Thanks again.