25 Jul
2015
25 Jul
'15
7:58 a.m.
On Jul 24, 2015, at 9:17 PM, Jamie Orzechowski <jamie.orzechowski@gmail.com> wrote:
I am a fresh convert from Radiator to FreeRadius. How do I strip off everything after the @ in the received username and append @newrealm.com?
$ man unlang The simplest way is probably a regex: if (User-Name =~ /^([^@]+)@/) { update request { User-Name := "%{1}@newrealm.com" } } That's the basic idea. You'll have to customize it for any additional requirements. Alan DeKok.