regex in hints file
Hello :) Can I use regex in Hints file?? DEFAULT User-Name =~ /^[0-9]/ Thank you very much -- :::::::::::::::::::::::::::::::::::: :: Ana Gallardo Gómez :: ::::::::::::::::::::::::::::::::::::
Hello Alan, In v3, no.
OK, I suppose... (0) preprocess: EXPAND /^[A-Za-z]/ (0) preprocess: --> /^[A-Za-z]/ (0) preprocess: EXPAND /^[0-9]/ (0) preprocess: --> /^[0-9]/ (0) [preprocess] = ok In v3, you have many other ways to do the same thing as the "hints" file.
OK Thank you very much -- :::::::::::::::::::::::::::::::::::: :: Ana Gallardo Gómez :: ::::::::::::::::::::::::::::::::::::
Hello again, neither in users file ¿true? (4) Received Access-Request Id 37 from 192.168.1.15:55069 to 192.168.1.6:1812 length 56 (4) User-Name = 'P44301ru@unex.es' (4) User-Password = '0000' (4) # Executing section authorize from file /etc/freeradius/sites-enabled/captive (4) authorize { (4) policy deny_realms_captive { (4) if (!&User-Name) { (4) if (!&User-Name) -> FALSE (4) if (&User-Name !~ /@((temp.)|(nodo.)|(alumnos.))?unex.es$/) { (4) if (&User-Name !~ /@((temp.)|(nodo.)|(alumnos.))?unex.es$/) -> FALSE (4) } # policy deny_realms_captive = notfound (4) policy filter_username_captive { (4) if (!&User-Name) { (4) if (!&User-Name) -> FALSE (4) if (&User-Name !~ /^[A-Za-z0-9]{3,15}@/) { (4) if (&User-Name !~ /^[A-Za-z0-9]{3,15}@/) -> FALSE (4) } # policy filter_username_captive = notfound (4) auth_log: EXPAND /var/log/freeradius/radacct/%{%{Packet-Src-IP-Address}:-%{Packet-Src-IPv6-Address}}/auth-detail-%Y%m%d (4) auth_log: --> /var/log/freeradius/radacct/ 192.168.1.15/auth-detail-20160506 (4) auth_log: /var/log/freeradius/radacct/%{%{Packet-Src-IP-Address}:-%{Packet-Src-IPv6-Address}}/auth-detail-%Y%m%d expands to /var/log/freeradius/radacct/192.168.1.15/auth-detail-20160506 (4) auth_log: EXPAND %t (4) auth_log: --> Fri May 6 14:07:54 2016 (4) [auth_log] = ok (4) suffix: Checking for suffix after "@" (4) suffix: Looking up realm "unex.es" for User-Name = "P44301ru@unex.es" (4) suffix: Found realm "unex.es" (4) suffix: Adding Stripped-User-Name = "P44301ru" (4) suffix: Adding Realm = "unex.es" (4) suffix: Authentication realm is LOCAL (4) [suffix] = ok (4) preprocess: hints: Matched DEFAULT at 41 (4) preprocess: EXPAND %{%{Stripped-User-Name}:-%{%{User-Name}:-DEFAULT}} (4) preprocess: --> P44301ru@unex.es (4) preprocess: SQL-User-Name set to 'P44301ru@unex.es' rlm_sql (sqllocal): Reserved connection (4) (4) preprocess: EXPAND /var/log/freeradius/sqllog.sql (4) preprocess: --> /var/log/freeradius/sqllog.sql (4) preprocess: Executing select query: SELECT COUNT(*) from radpostauth WHERE username = 'P44301ru@unex.es' AND authdate > CURRENT_DATE and reply = 'Access-Reject' rlm_sql (sqllocal): Released connection (4) (4) preprocess: EXPAND %{sqllocal:SELECT COUNT(*) from radpostauth WHERE username = '%{User-Name}' AND authdate > CURRENT_DATE and reply = 'Access-Reject'} (4) preprocess: --> 1 (4) [preprocess] = ok (4) files: EXPAND /^[a-zA-Z]/ (4) files: --> /^[a-zA-Z]/ (4) [files] = noop :::::::::::::::::::::::::::::::::::: :: Ana Gallardo Gómez :: ::::::::::::::::::::::::::::::::::::
Thank you very much. :::::::::::::::::::::::::::::::::::: :: Ana Gallardo Gómez :: ::::::::::::::::::::::::::::::::::::
participants (2)
-
Alan DeKok -
Ana Gallardo Gómez