Questions regarding trimming User-Name attribute via filter.
Matthew Newton
mcn4 at leicester.ac.uk
Wed Sep 9 22:59:09 CEST 2015
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 at 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 at le.ac.uk>
More information about the Freeradius-Users
mailing list