7 Jun
2010
7 Jun
'10
2:41 p.m.
On Jun 7, 2010, at 11:35 AM, Greg Malewski wrote:
Hi, I have been unable to find any examples - if the facility exists - of being able to process a username prior to forwarding it. For example, I may wish to take a username such as joe_bloggs and convert it into joe.bloggs prior to passing it on to the authentication oracle.
authorize { if(User-Name =~ /([^_]+)_(.*)/){ update request { User-Name := "%{1}.%{2}" } } .... }
Furthermore, is it possible to only do this with some RADIUS clients?
Yes. Use conditional checks on the Client-Shortname attribute. See man unlang. -Arran