attr_rewrite question

Norbert Wegener nw at sbs.de
Wed Jul 12 14:39:28 CEST 2006


Someone pointed me to the fact, that saneusername should be in the 
authorize section and now it works.
Norbert Wegener

Norbert Wegener wrote:

> I am using FreeRADIUS Version 1.1.0 on a Suse10.1 system and want to 
> rewrite the User-name in that way, that all ":" in that name are 
> dropped, before fr looks into the users file.
>
> In analogy to sanecallerid in radiusd.conf I setup
>
>     attr_rewrite saneusername {
>                attribute = User-Name
>                # may be "packet", "reply", "proxy", "proxy_reply" or 
> "config"
>                searchin = packet
>                searchfor = "[:]"
>                replacewith = ""
>                ignore_case = no
>                new_attribute = no
>                max_matches = 10
>                ## If set to yes then the replace string will be 
> appended to the original string
>                append = no
>        }
>
>
> Running
> radtest  12:34:567890123 1234567890123 lnxt2 0 maxen
> Sending Access-Request of id 114 to 149.246.222.70 port 1812
>        User-Name = "12:34:567890123"
>        User-Password = "1234567890123"
>        NAS-IP-Address = 255.255.255.255
>        NAS-Port = 0
> rad_recv: Access-Reject packet from host 149.246.222.70:1812, id=114, 
> length=20
>
>
>
> radiusd -AX shows:
> ...
> Ready to process requests.
> rad_recv: Access-Request packet from host 149.246.133.44:32791, id=46, 
> length=66
>        User-Name = "12:34:567890123"
>        User-Password = "1234567890123"
>        NAS-IP-Address = 255.255.255.255
>        NAS-Port = 0
>
> What am I doing wrong?
> Thanks
> Norbert Wegener
>
>
> - List info/subscribe/unsubscribe? See 
> http://www.freeradius.org/list/users.html





More information about the Freeradius-Users mailing list