<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
<title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
<title></title>
<small><big>Dear All,<br>
I need your help to configure FreeRadius to rewrite the User-Name
attribute in Accounting-Request.<br>
my setup as follow; please correct me if i had a mistake,<br>
i'm using Freeradius to do a proxy to another radius server. we are
using one username (<font color="#ff0000">wanadoo</font>) as a default
username for our prepaid card system.<br>
in the freeradius server we replace the username with a new one which
is the same as the password, so we are using <font color="#3366ff">pre-proxy</font>
to call <font color="#3366ff">attr_rewrite</font> that will replace
the username with the new one. As an authintecation process every
thing goes will, but for the Accounting the free radius didnt change
the username and send it as it is to the another radius which mean that
i couldnt do accounting for them. so could you please help me to solve
like this problem.<br>
<br>
<font color="#cc6600">attr_rewrite fixusername {<br>
attribute = User-Name<br>
searchin = proxy<br>
searchfor ="wanadoo"<br>
replacewith = %{Password}<br>
ignore_case = no<br>
new_attribute = no<br>
max_matches = 10<br>
append = no<br>
}</font><br>
<br>
<font color="#cc6600">pre-proxy {<br>
fixusername<br>
pre_proxy_log<br>
}<br>
<font color="#000000">This is what i found in the log file,<br>
<br>
</font></font><font color="#33cc00"><small>Packet-Type = Access-Request<br>
Wed Jan 31 07:55:27 2007<br>
User-Name = "11111111114242"<br>
User-Password = "11111111114242"<br>
NAS-IP-Address = 172.16.5.188<br>
Client-IP-Address = 172.16.5.188<br>
Stripped-User-Name = "wanadoo"<br>
Realm = "coolnet"<br>
Realm = "coolnet"<br>
Proxy-State = 0x3833<br>
<br>
Packet-Type = Accounting-Request<br>
Wed Jan 31 07:55:27 2007<br>
Acct-Session-Id = "76"<br>
Acct-Status-Type = Start<br>
User-Name = "wanadoo"<br>
NAS-Port = 2<br>
Service-Type = Framed-User<br>
Framed-Protocol = PPP<br>
Framed-IP-Address = 255.255.255.254<br>
Class = 0x5376633d32<br>
NAS-IP-Address = 172.16.5.188<br>
Client-IP-Address = 172.16.5.188<br>
Acct-Unique-Session-Id = "26331f725bfc7b96"<br>
Stripped-User-Name = "wanadoo"<br>
Realm = "coolnet"<br>
Realm = "coolnet"<br>
Proxy-State = 0x3834<br>
</small></font></big></small>
</body>
</html>