Freeradius version 0.8.1
FreeBSD version 4.8

I am trying to rewrite the User-Name attribute using

attr_rewrite add_realm {
                attribute = User-Name
                searchin = packet
                searchfor = "^[a-z0-9_\-]+$"
                replacewith = "@domain"
                ignore_case = yes
                max_matches = 1
                new_attribute = no
                append = yes
        }

and then placing the module call within the

accounting {
        acct_unique
        add_realm
        detail
#       counter
        unix            # wtmp file
        radutmp
#       sradutmp
}


This sort of works, but what the detail file contains is as follows


Tue Jun 17 14:57:54 2003
        Acct-Session-Id = "EB000032"
        User-Name = "username"
        NAS-IP-Address = 10.10.10.1
        NAS-Port = 0
        NAS-Port-Type = Async
        Acct-Status-Type = Start
        Acct-Authentic = RADIUS
        Service-Type = Framed-User
        Framed-Protocol = PPP
        Framed-IP-Address = 10.10.10.2
        Acct-Delay-Time = 0
        Client-IP-Address = 10.10.10.1
        Stripped-User-Name = "[EMAIL PROTECTED]"
        Realm = "NULL"
        Acct-Unique-Session-Id = "e44b1b3600511703"
        Timestamp = 1055887074

It modifies the Stripped-User-Name and not the User-Name attribute which is what I am after. Any suggestions would be most helpful, thank you.

--
Sean Peterson
System Administrator
ABC Communications, Valley Internet Division
[EMAIL PROTECTED] 250.770.1384


- List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html

Reply via email to