Issue when freeRadius is accessed using JRadius Client.

kpani dhandu_k at yahoo.co.in
Mon Jun 29 16:20:31 CEST 2009


Thanks Ivan for the suggestion. Finally I found the reason behind the issue
was wrong AttributeDictionaryImpl as below. It failed to decode attribute as
it does not fond in teh given impl.
> AttributeFactory.loadAttributeDictionary("net.jradius.dictionary.AttributeDictionaryImpl");

instead of the right one 
> AttributeFactory.loadAttributeDictionary("net.sf.jradius.dictionary.AttributeDictionaryImpl");

It works fine now.

Regards,
Dhandapani


Ivan Kalik wrote:
> 
>> I am using JRadius Client with freeRadius server for user authentication.
>> The following code is used to access freeRadius server:
>> ----------------------------------------------------------------------
>> AttributeFactory.loadAttributeDictionary("net.jradius.dictionary.AttributeDictionaryImpl");
>> InetAddress addr = InetAddress.getByName(radiusServerAddress);
>> RadiusClient radiusClient = new RadiusClient(addr, secretKey);
>> AttributeList attributeList = new AttributeList();
>> attributeList.add(new Attr_UserName(userName));
>> attributeList.add(new Attr_NASPortType(Attr_NASPortType.Ethernet));
>> attributeList.add(new Attr_NASPort(new Long(1)));
>> AccessRequest request = new AccessRequest(radiusClient, attributeList);
>> request.addAttribute(new Attr_UserPassword(password));
>> RadiusPacket reply = radiusClient.authenticate(request, new
>> PAPAuthenticator(), 0);
>> System.out.println("Received: " + reply.toString());
>> ------------------------------------------------------------------------
>>
>> The server authenticates the user successfully but the response message
>> is
>> printed as follows. So I couldn't read the response values.
>>      Unknown-Attribute(6) = [Binary Data (length=4)]
>>      Unknown-Attribute(7) = [Binary Data (length=4)]
>>
>> The /usr/local/etc/raddb/users configuration is as follows :
>>     dave   Cleartext-Password := "public"
>>            Service-Type = Framed-User,
>>            Framed-Protocol = PPP,
>>
>> Please help me to resolve this issue. Am I missing anything?
> 
> You have to decode the reply. Just like you encoded the request.
> 
> Ivan Kalik
> Kalik Informatika ISP
> 
> -
> List info/subscribe/unsubscribe? See
> http://www.freeradius.org/list/users.html
> 
> 

-- 
View this message in context: http://www.nabble.com/Issue-when-freeRadius-is-accessed-using-JRadius-Client.-tp24202940p24255031.html
Sent from the FreeRadius - User mailing list archive at Nabble.com.




More information about the Freeradius-Users mailing list