Fwd: Regular expression - Trying to rewrite User-Name

Dennis Skinner dskinner at bluefrog.com
Thu May 11 22:30:20 CEST 2006


Damian Porter wrote:
> the user-name is coming to the radius process without any dashes and i
> want to add dashes to separate the octets.
>  
> I have looked an that document and it does not offer a solution for the
> problem.

Are you responding to me?

0e35-353afe-3afe19-fe19 has dashes.  Either it came that way or your
regex works (at least partially).  If it came that way, then your
searchfor will never work because it is not expecting those dashes.  If
it didn't come that way, I'd be surprised because it doesn't look like
your regex should do that.

Try running the server in debug mode and send us the output.  You may be
surprised by what it tells you.

As to the link, look again.  It wasn't meant to fix your regex, it was
meant to suggest an alternative way to do what you are doing (you still
need to figure out the regex).  It has instructions on how to rewrite a
username using regex (exactly what you are trying to do) with just the
hints file.  It is a bit more elegant and will likely rewrite the
username sooner in the processing, allowing you to use the new username
in huntgroups, etc.

-- 
Dennis Skinner
Systems Administrator
BlueFrog Internet
http://www.bluefrog.com



More information about the Freeradius-Users mailing list