suffix not work for me

Tony Peña emperor.cu at gmail.com
Thu Sep 27 18:06:44 CEST 2012


i put the hint file more below after radiusd -X.. check again please...
i miss policyfilter...
i send again both.

/etc/freeradius/hints

DEFAULT Suffix == "@my.domain.cu", Strip-User-Name = Yes
 Hint = "userdefault",
Service-Type = Framed-User,
Framed-Protocol = PPP,

/etc/freeradius/policy.conf   (is the original file, i just activate
uncommented # ) anyway here is

policy {
forbid_eap {
 if (EAP-Message) {
reject
}
 }
permit_only_eap {
if (!EAP-Message) {
 if (!"%{outer.request:EAP-Message}") {
reject
}
 }
}
deny_realms {
 if (User-Name =~ /@|\\/) {
reject
}
 }
do_not_respond {
update control {
 Response-Packet-Type := Do-Not-Respond
}
handled
 }
filter_username {
if (User-Name =~ /^ /) {
 reject
}
if (User-Name =~ / $$/) {
 reject
}
if (User-Name != "%{tolower:%{User-Name}}") {
 reject
}
}
 cui_authorize {
update request {
Chargeable-User-Identity:='\\000'
 }
}
cui_postauth {
 if (FreeRadius-Proxied-To == 127.0.0.1) {
if (outer.request:Chargeable-User-Identity) {
 update outer.reply {
Chargeable-User-Identity:="%{md5:%{config:cui_hash_key}%{User-Name}}"
 }
}
}
 else {
if (Chargeable-User-Identity) {
update reply {
 Chargeable-User-Identity="%{md5:%{config:cui_hash_key}%{User-Name}}"
}
 }
}
}
 cui_updatedb {
if (reply:Chargeable-User-Identity) {
cui
 }
}
cui_accounting {
 if (!Chargeable-User-Identity) {
update control {
Chargable-User-Identity := "%{cui: SELECT cui FROM cui WHERE
clientipaddress = '%{Client-IP-Address}' AND callingstationid =
'%{Calling-Station-Id}' AND username = '%{User-Name}'}"
 }
}
if (Chargeable-User-Identity && (Chargeable-User-Identity != "")) {
 cui
}
}
 mac-addr =
([0-9a-f]{2})[^0-9a-f]?([0-9a-f]{2})[^0-9a-f]?([0-9a-f]{2})[^0-9a-f]?([0-9a-f]{2})[^0-9a-f]?([0-9a-f]{2})[^0-9a-f]?([0-9a-f]{2})
rewrite.called_station_id {
 if((Called-Station-Id) && "%{Called-Station-Id}" =~
/^%{config:policy.mac-addr}(:(.+))?$/i) {
update request {
 Called-Station-Id := "%{tolower:%{1}-%{2}-%{3}-%{4}-%{5}-%{6}}"
}
 if ("%{8}") {
update request {
Called-Station-Id := "%{Called-Station-Id}:%{8}"
 }
}
updated
 }
else {
noop
 }
}
rewrite.calling_station_id {
 if((Calling-Station-Id) && "%{Calling-Station-Id}" =~
/^%{config:policy.mac-addr}$/i) {
update request {
 Calling-Station-Id := "%{tolower:%{1}-%{2}-%{3}-%{4}-%{5}-%{6}}"
}
 updated
}
else {
 noop
}
}
}




2012/9/27 alan buxey <A.L.M.Buxey at lboro.ac.uk>

> Hi,
>
> >            User-Name = "[1]usertest at my.domain.cu"
>
> okay..
>
> >    [preprocess]   hints: Matched DEFAULT at 36
> >    ++[preprocess] returns ok
>
> and what is in your hints file?
>
> >    ++- policy filter_username returns ok
>
> and what is in this policy?
>
> alan
> -
> List info/subscribe/unsubscribe? See
> http://www.freeradius.org/list/users.html
>



-- 
Antonio Peña
Secure email with PGP 0x8B021001 available at http://pgp.mit.edu
 Fingerprint: 74E6 2974 B090 366D CE71  7BB2 6476 FA09 8B02 1001
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freeradius.org/pipermail/freeradius-users/attachments/20120927/56c12ad9/attachment.html>


More information about the Freeradius-Users mailing list