Realm Stripping 
    Leon Kyneur 
    leon at dexterous.org
       
    Thu Nov  2 03:51:11 CET 2006
    
    
  
On Wed, 1 Nov 2006, Alan DeKok wrote:
> Leon Kyneur <leon at dexterous.org> wrote:
>> Could this be done by setting the "strip" parameter under a NULL or the
>> DEFAULT realm? (doesn't appear to work for me either)
>
>  No, you'll have to configure a realm, or a regular expression to
> match the text after the "@" in the User-Name.
Thanks Alan, I've achieved this by replacing all occurrences of 
'%{SQL-User-Name}' with the following SQL in sql.conf:
IF(INSTR('%{SQL-User-Name}','@'),LEFT('%{SQL-User-Name}',INSTR('%{SQL-User-Name}', '@')-1),'%{SQL-User-Name}')
    
    
More information about the Freeradius-Users
mailing list