rewrite User-Name in received Access-Request - tough question :)

Arran Cudbard-Bell a.cudbardb at freeradius.org
Sun Oct 28 10:23:22 CET 2012


> 
> That is working fine, users can connect to the network, BUT accounting section logges their username in database as original MAC address, not rewritted username freeinternetfor30minutes .

You get that Accounting-Requests and Access-Requests are completely unrelated right? They're two different types of packet sent by the NAS, so rewriting you do in the request section has absolutely no effect on the accounting section?

That said with most NAS you can request that it change the User-Name associated with the session by sending back a User-name value in the Access-Accept. You'd just do something like:

update reply {
	User-Name := "%{User-Name}"
}

after you'd done the rewriting, the NAS may or may not honour this, you'll have to test.

-Arran


More information about the Freeradius-Users mailing list