Removing characters from usernames

Markus Krause krause at biochem.mpg.de
Thu Feb 1 18:53:24 CET 2007


I am doing this using the "attr_rewrite" module in radiusd.conf, i  
have the following section:

----
modules {
    ....
         attr_rewrite macaddress_rewrite {
                 attribute = User-Name
                 searchin = packet
                 searchfor = "-"
                 replacewith = ":"
                 new_attribute = no
                 append = no
         }
    ....
}
----

i call it just before the actual ldap-module i am using.

hth
   regards
     markus


Zitat von Andrew Zirkel <azirkel at exeter.k12.pa.us>:
> I was thinking I could do something like this with a regular expression:
> User-Name =~ tr/-//d
> but I'm not sure where to do it and if it will work.  I'm using a
> mysql back end so I was thinking in the sql.conf file.
> Has anyone done something like this before?
>
> Thanks,
> Andy
>
> On Jan 31, 2007, at 4:05 PM, Andrew Zirkel wrote:
>
>> Is there a way to parse the input of a username and password before
>> it is passed to the back end database?  I'm doing mac address
>> authentication and some devices are passing the mac address with
>> dashes, where I need to have no separation between the octets.  I
>> basically need to strip out these dashes from the input.
>>
>> Thanks
>> Andy Zirkel
>> -List info/subscribe/unsubscribe? See http://www.freeradius.org/
>> list/users.html
>
> -
> List info/subscribe/unsubscribe? See   
> http://www.freeradius.org/list/users.html
>



-- 
Markus Krause                                   email: krause at biochem.mpg.de
Mogli-Soft: Support for Mac OS X, Webmail/Horde, LDAP, RADIUS
by order of the Computing Center of the Max-Planck-Institute of Biochemistry
Tel.: 089 - 89 40 85 99                         Fax.: 089 - 89 40 85 98

----------------------------------------------------------------------
      This message was sent using https://webmail2.biochem.mpg.de
If you encounter any problems please report to rz-linux at biochem.mpg.de






More information about the Freeradius-Users mailing list