keb at pa.net
Mon Feb 19 22:55:28 CET 2007
On Monday 19 February 2007 15:29, Ben Butler wrote:
> I am having some problems with attr_rewrite.
> What I want to do is the following at a pre authorisation phase:
> User-Name = username at somedomain.com
> User-Name = somedomain.com
> I want to call by attr_rewrite function for each of the domains that I want
> to stip the username from prior to authorisation.
I'm not very familiar with attr_rewrite, so I'm posting what I would do if I
were presented with this issue.
We use the hints file to rewrite the request username, as needed. A hints
file example that should do what you want:
DEFAULT User-Name =~ "^.*@somedomain.com$"
User-Name := "somedomain.com"
Then just define somedomain.com in your users file (or DB) and process it like
a normal request.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 189 bytes
Desc: not available
More information about the Freeradius-Users