Value-pairs from exec script

Brian Wallen bwallen at
Wed Mar 6 21:11:57 CET 2013

Here's a paste of it ( I took
the script and modified the authorize section. I'm trying to
allow users to walk/roam between access points without having to
re-authenticate when they get handed off to the new access point. I set the
APs to try mac authentication first, then my script runs and checks if they
were previously authenticated at another AP. If so, it disconnects them
from the old AP and reconnects them to the new AP and the user doesn't have
to log in again.

That all works. The only thing is that when a user moves from one AP to
another and gets authenticated via their mac address, the username in the
radacct SQL table is set to the mac address. I'm trying to change User-Name
to the actual username. I'm just getting a second User-Name pair instead of
replacing the existing one.

On Wed, Mar 6, 2013 at 2:56 PM, Alan DeKok <aland at>wrote:

> Brian Wallen wrote:
> > Thanks for the suggestion, Alan. I've rewritten my script in Perl but
> > I'm still having the same issue. In my log I see two pairs for User-Name:
>   Because that's probably what you told it to do.
> > rlm_perl: Added pair User-Name = MyOldUsername
> > rlm_perl: Added pair User-Name = MyNewUsername
> >
> > So how to I make rlm_perl change/overwrite the value of User-Name rather
> > than add a second User-Name pair? I tried returning updated rather than
> > ok, but that didn't seem to make any difference. In my script I have
> >
> > $RAD_REPLY{'User-Name'} = 'MyNewUsername';
> >
> > Is there maybe an operator besides = that I should use?
>   No.  Normal Perl should work.
>   So... what does your script do?  Can you pare it down to an example
> you can post here?  Otherwise, you message is little more than "it
> doesn't work".
>   Alan DeKok.
> -
> List info/subscribe/unsubscribe? See
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the Freeradius-Users mailing list