I do this from perl by creating a new check attribute in rlm_perl $RAD_CHECK{'User-Name'} and then updating the Request User-Name in rewrite_attr using the new check list entry.
[ We actually do a whole heap of switching decisions in perl, create a few new attributes (pools, IP Pools, Service Names, realms etc) which are then used in the proxy and rewite modules to do the rest of the work.
This gives us the power of a programming language in the guts of a nice, fast radius server. The code does all the custom decision making while Free Radius handles being a good standard complient radius server. ]
Bruce
Steve Chan wrote:
Alan,
Actually, I went back and tried to edit the $RAD_REQUEST{'User-Name'}, but it seemed to have no effect either.
I came across an old mailing list thread that seemed to indicate that you can't update the existing values in %RAD_REQUEST, and I don't know if that has been changed recently.
Does the rlm_python module all you to rewrite the original User-Name attribute?
Steve
----- Original Message ----- From: "Alan DeKok" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Saturday, July 31, 2004 8:09 AM
Subject: Re: Rewriting User-Name attribute without rewrite_attr
Stephen Chan <[EMAIL PROTECTED]> wrote:http://www.freeradius.org/list/users.html
Ideally I'd like to do a Berkeley DB lookup on the User-Name and replace it with a new name. I figured out how to get the rlm_perl module to work. As a trivial test, I try forcing the User-Name attribute to another value with:
$RAD_REPLY{'User-Name'} = 'otheruser';
You're editing the reply, when you want to edit the request.
Alan DeKok.
-
List info/subscribe/unsubscribe? See
- List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
- List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html