CAS in moodle with selected users only!

CAS in moodle with selected users only!

by Kostas Kostas -
Number of replies: 3

Hi I want to import in moodle 3.11 a list of users (I know how to do it). During import no passwords are imported.

Then I want to use CAS authentication so that these users can login. But ONLY these users that are imported already. I do not want CAS to create new local users in the moodle instance.

How can I do this?

Average of ratings: -
In reply to Kostas Kostas

Re: CAS in moodle with selected users only!

by Howard Miller -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
You can set the order in which authentication methods are checked for new users. So, if they (for example) are also in LDAP they would catch that first. I'm not sure if this helps.
Average of ratings: Useful (1)
In reply to Howard Miller

Re: CAS in moodle with selected users only!

by Kostas Kostas -
They are local users imported manually.
I do not want NEW users to be created at all.
I just want the already imported local users only, to be authenticated through CAS.
Is that possible somehow?
Thank you
In reply to Kostas Kostas

Re: CAS in moodle with selected users only!

by Kostas Kostas -
I think I found it and I present it here for reference.
You have to check the "Prevent account creation when authenticating" in the general authentication options and enable CAS. This allows ONLY previously manually created users (eg excell uploaded) to be authenticated through CAS. Users that are not already exist in moodle will not be created in the moodle database even if they pass cas authentication.

Note here https://docs.moodle.org/310/en/CAS_server_%28SSO%29_authentication you have to edit the field "auth" in the mdl_user table and change the value from "manual" to "cas" for all the existing users in the table, or else they coult not login through CAS.