more than one AVP from LDAP with same name is it possible ?

Kostas Kalevras kkalev at noc.ntua.gr
Fri Mar 30 20:25:01 CEST 2007


O/H Bodin Bruno έγραψε:
> Hello,
>
> My problem is about Radius reply. With user file it's possible to reply 
> some AVPs with same name like that :
> My-AVP += "name:robert",
> My-AVP += "age:38",
> My-AVP += "country:fr"
>
> most important it's possible to do that :
>  Sip-AVP+= "username:%{User-Name}"
>
> But how it's possible to do  something like that with ldap attribute ?
> because I use this :
> replyItem    My-AVP           username_radius
>
> but that work only one time, because when I do :
> replyItem    My-AVP           username_radius
> replyItem    My-AVP           age_radius
>
> it's only return the last attribute content ( 38, the age of Robert ).
> And when I type this :
> replyItem    My-AVP           username_radius,age_radius
>
> that return nothing ...
>  Too bad, return 2 AVPs should be better :(
>
> there is any method to do this ? could it be a new feature ?
>
> thank for help
>
> - 
> List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
>   
You can include the operator in the ldap attribute value. You can also 
set the operator (from the default = for reply items) for an attribute 
in the ldap.attrmap (i m not sure if it's only available in the cvs).


First solution:
ldap.attrmap:
replyItem My-AVP ldap_my_avp
In the ldap entry you can do:

ldap_my_avp: += "name:robert"
ldap_my_avp: += "age:38"

Second solution:
ldap.attrmap:
replyItam My-AVP ldap_my_avp +=

ldap entry:
ldap_my_avp: "name:robert"
ldap_my_avp: "age:38"

Hope this helps


--
Kostas Kalevras
Network Operations Center - National Technical University of Athens
http://kkalev.wordpress.com



More information about the Freeradius-Users mailing list