问题原文
原帖链接 · kekosz · CC BY-SA 4.0
I have VirtualMachine with freeradius server (3.0). I am using the authorization file which contains my PPPoE users. The problem seems to be the username: the login is in UPPER CASE which collides with the incoming username.
I can't manually change this because my config file is generated by LMS (Lan Management System - I won`t change anything in code). Is there any method to turn off case-sensitivity in freeradius?
This is my config:
EXAMPLEUSER Cleartext-Password := "ExamplePassword01@"
Framed-Protocol = PPP,
Framed-IP-Address = 192.168.0.33,
Framed-IP-Netmask = 255.255.255.0,
Service-Type = Framed-User,
Mikrotik-Rate-Limit = "30000k/30000k 30000k/30000k 30000k/30000k 1/1 1 30000k/30000k"
I tried to find information about case-sensitivity, but I couldn't find anything.
已采纳解答
原帖链接 · Andrew Lowther · CC BY-SA 4.0
The FreeRadius expr module does provide toupper and tolower. You could convert the received username to "UPPER CASE" in the authorize section or in a policy.
Slightly modified example from the first link
authorize {
update request {
Stripped-User-Name := "%{toupper:%{User-Name}}"
}
links
- Suggestion "to just mash the User-Name" from the FreeRadius mailing list
- The example policy
canonicalizationhas examples of changing attributes withtoupper - expr module documentation
摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。
