This is what I have so far and this is what produces no result. In the debug log it shows that it is replacing the username which has no realm with the stripped user name which also has no realm. So basically has no effect. But it still shows in the detail file as User-Name = [EMAIL PROTECTED] Any other ideas.
attr_rewrite username {
attribute = User-Name
searchin = packet
searchfor = ".*"
replacewith = "%{Stripped-User-Name}"
ignore_case = no
max_matches = 1
New_Attribute = no
}
-----Original Message-----
From: Alexander M. Pravking [mailto:[EMAIL PROTECTED]]
Sent: Saturday, May 31, 2003 6:42 AM
To: [EMAIL PROTECTED]
Subject: Re: Attr_rewrite
On Sat, May 31, 2003 at 02:24:44AM -0400, Gene Parks wrote:
> I have tried using attr_rewrite to get the User-Name attribute to appear
> in the detail file as just the username without the realm. It seems the
> system is already stripping the realm off of it before it gets processed
> by the attr_rewrite. So basically it has no effect. Then it seems to
> put the realm back on the username before it commits it to the detail
> file. Has anyone got and ideas on how I might get the User-Name to
> appear as I need it to?
User-Name in request is never stripped. Instead, new attribute
Stripped-User-Name is added. Try using
replace_with = "%{Stripped-User-Name}"
--
Fduch M. Pravking
-
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
