Hello,

 

I was wandering if anyone can help me.  I am trying to set up freeradius
2.1.x

 

In the authorized section of default, we have the following coding:

 

 

if("%{User-Name}" =~ /\\\\?([...@\\\\]+)@?([-[:alnum:]._]*)?$/) {

        update request {

               Realm := "%{2}"

        }

        if(!"%{2}" || ("%{2}" == "worc.ac.uk") || ("%{2}" ==
"worcester.ac.uk") ){

                update request {

                        Realm := "worc"

                }

        }

}

 

 

else{

        update request {

                Stripped-User-Name := "anonymous"

                Realm := 'local'

        }

}

 

 

 

switch "%{Realm}" {

        case "worc" {

                update control {

                       Proxy-To-Realm := "worc"

                }

                update request {

                       Realm := "worc"

                }

         # Don't do any proxy stuff here, request will be handled later.

        }

        case {

                update control {

                        Proxy-To-Realm := "jrs"

                }

                update request {

                       Realm := "jrs"

                }

        }

}

 

This should check the extension to the user name, if it is worc or Worcester
it will use the realm "worc", if it is anonymous, use the "local" realm.
Otherwise use the "jrs" realm. Which works fine. There is a problem, as our
users are split into 2 separate section, staff & students. 

 

Above works fine for staff, as the realm "worc" handles this authentication.
But we do need to filter the students & place these in another realm,
"student".  

 

The staff login id is:

 

ps...@worc.ac.uk

 

Whereas the student login is in the format:

 

psdn1...@worc.ac.uk

 

Would it be possible to filter on the format of the userid? The student id
has `_02 on it.

 

Regards,

 

Nick.

-
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html

Reply via email to