Is there a way to tell radius to not do something based on the User-Name containing a "$" ? I am doing dynamic VLAN assignment and I'd like to skip that for computer logins. I looked at unlang and I didn't see a way to check for a character in a username. Tena Gore Senior Network Administrator Technology Support Services Fairfield-Suisun Unified School District tenag@fsusd.org 707-399-1200
N evermind, I figured out a way to do what I needed. Thanks! Tena Gore Senior Network Administrator Technology Support Services Fairfield-Suisun Unified School District tenag@fsusd.org 707-399-1200 On Mon, Jul 22, 2013 at 11:20 AM, Tena Gore <tenag@fsusd.org> wrote:
Is there a way to tell radius to not do something based on the User-Name containing a "$" ? I am doing dynamic VLAN assignment and I'd like to skip that for computer logins. I looked at unlang and I didn't see a way to check for a character in a username.
Tena Gore Senior Network Administrator Technology Support Services Fairfield-Suisun Unified School District tenag@fsusd.org 707-399-1200
Hi,
Is there a way to tell radius to not do something based on the User-Name containing a "$" ? I am doing dynamic VLAN assignment and I'd like to skip that for computer logins. I looked at unlang and I didn't see a way to check for a character in a username.
use unlang regex check...you'll need to escape the "$" as thats end of line for regex. hosts should be matched with eg if (User-Name =~ /^host\/.*\\.YOUR\\.AD\\.REALM$/i) { stuff goes here } alan
Alan, You've reminded me of a question I've been meaning to ask. Your previous answer gives an example using the unlang regex syntax, including the case-insensitive operator at the end. But I was hoping to find an elegant way to do case-insensitive matching in proxy.conf, where the comments admit that the syntax breaks the rules of unlang regex matching. Putting an 'I' at the end hasn't worked for me. I'd love to do this: realm "~FOO\\.EDU$"i { stuff here } Is the case-insensitive behavior supported in proxy.conf? Thanks, Steve -----Original Message----- Alan sagely explained: use unlang regex check...you'll need to escape the "$" as thats end of line for regex. hosts should be matched with eg if (User-Name =~ /^host\/.*\\.YOUR\\.AD\\.REALM$/i) { stuff goes here } alan - List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
Hi,
Your previous answer gives an example using the unlang regex syntax, including the case-insensitive operator at the end. But I was hoping to find an elegant way to do case-insensitive matching in proxy.conf, where the comments admit that the syntax breaks the rules of unlang regex matching. Putting an 'I' at the end hasn't worked for me.
I'd love to do this: realm "~FOO\\.EDU$"i { stuff here }
Is the case-insensitive behavior supported in proxy.conf?
dont do that. use unlang to define a proper realm contruct and then use that. either using native or with case eg either something like this, if("%{realm}" =~ /foo.edu/i { update request { Realm := "foo.edu" } } then switch "%{Realm}" { case "NULL" { } case "foo.edu" { update control { Proxy-To-Realm := "foo.edu" } } # etc etc } or this: if("%{realm}" =~ /foo.edu/i { update request { Realm := "foo.edu" } update control { Proxy-To-Realm := "foo.edu" } } alan
participants (3)
-
A.L.M.Buxey@lboro.ac.uk -
Lovaas,Steven -
Tena Gore