Questions regarding trimming User-Name attribute via filter.
Hi. I'm having issues with migrating from 2.1.0 to 3.0.4 (Centos 7.x). In version 2.1.0 I have in /etc/freeradius/users: DEFAULT User-Name =~ ".{5}$" User-Name = `%{0}` This does not work anymore, and I am struggling to understand how to achieve the same thing in 3.0.4. What I want to achieve is, that anything that comes before the last five characters should be removed from the User-Name attribute, and only the last five characters should be left as User-Name. I understand that I have to do this in /etc/raddb/policy.d/filter somehow, but I fail to see how. Would somebody with better knowledge please assist. BR, /PGE
On Wed, Sep 09, 2015 at 08:43:53PM +0000, Pro Green European via Freeradius-Users wrote:
What I want to achieve is, that anything that comes before the last five characters should be removed from the User-Name attribute, and only the last five characters should be left as User-Name.
I understand that I have to do this in /etc/raddb/policy.d/filter somehow, but I fail to see how.
man unlang sites-enabled/default, authorize {}: if (&User-Name =~ /(.{5})$/) { update request { User-Name := "%{1}" } } Matthew -- Matthew Newton, Ph.D. <mcn4@le.ac.uk> Systems Specialist, Infrastructure Services, I.T. Services, University of Leicester, Leicester LE1 7RH, United Kingdom For IT help contact helpdesk extn. 2253, <ithelp@le.ac.uk>
participants (2)
-
Matthew Newton -
Pro Green European