FreeRadius + AD + Realms

Matthew P mayday64 at hotmail.com
Sun Jul 4 13:11:05 CEST 2010


>> In a general regexp language, I guess that could be done with ([\w.-]+)(?=@.*).

> Most regexes don't support \w, or (?... constructs.
>
> Keep it simple:
>
> if (User-Name =~ /^(.*)@(.*)$/) {
>       # name = %{1}
>       # realm = %{2}
> }
Makes sense now :) Thanks.
man regex is written mostly descriptive, it's much easier to understand on examples like these, than on "weeknights" :D

But I guess I missed to point with doing it this way, because:

if (User-Name =~ /@mydomain.com/) {
    if (User-Name =~ /^(.*)@(.*)$/) {
        update request {
            Stripped-User-Name = %{1}
        }
        ldap
    }
}

doesn't work ^^
It gives:
rlm_ldap - authorize
rlmd_ldap: performing user authorization for %{1}
...

Also, I tried to apply this directly in the ldap module configuration, different outcome, but also doesn't work.

Where did I go wrong? -_-
 		 	   		  
_________________________________________________________________
Hotmail: Trusted email with Microsoft’s powerful SPAM protection.
https://signup.live.com/signup.aspx?id=60969



More information about the Freeradius-Users mailing list