Problems with User-Name/Stripped-User-Name

Nicolas Baradakis nbk at sitadelle.com
Wed Jul 27 15:27:57 CEST 2005


Erling Paulsen wrote:

> Is it possible to have the stripped username stored somewhere, even
> if I set 'nostrip' for a realm in proxy.conf?

You can create the attribute Stripped-User-Name with an other module
than rlm_realm. For example, you could have in radiusd.conf:

modules {
	attr_rewrite copy.user-name {
		attribute = Stripped-User-Name
		new_attribute = yes
		searchin = packet
		searchfor = ""
		replacewith = "%{User-Name}"
	}

	attr_rewrite strip.user-name {
		attribute = Stripped-User-Name
		new_attribute = no
		searchin = packet
		searchfor = "@.*$"
		replacewith = ""
		max_matches = 1
	}
	...
}

authorize {
	copy.user-name
	strip.user-name
	...
}

-- 
Nicolas Baradakis



More information about the Freeradius-Users mailing list