Good Morning,
Where are you placing this code? I think the attribute you should be using is "%{User-Name}". This will get you the sql_user_name attribute from the sql.conf file. If this is what you want.
Regards
Kenneth L. Miller
Information Technology Specialist
CENWP-IM-C
Portland, Oregon
(503) 808-5056
-----Original Message-----
From: System Administrator [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, June 17, 2003 3:05 PM
To: [EMAIL PROTECTED]
Subject: attr_rewrite troubles
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
