19 Sep
2014
19 Sep
'14
8:08 a.m.
On 19-09-14 08:30, Farrell Yang wrote:
Thanks for Alan's reply, but it do not work. I did this "use unlang to make SQL-User-Name have the username without the "Windows Phone\" part" like the following :
if ("%{request:User-Name}" =~ /^(.*)\\(.*)/) {
You'll need the following regex: if ("%{request:User-Name}" =~ /^(.*)\\\\(.*)/) One level of escapes because the \ is a special character in freeradius configs, and one level because the \ is a special character in regular expressions. In freeradius versions earlier than 3.0.4, you'll actually need 8 backslashes instead of 4. -- Herwin Weststrate