Search code examples
cdictionaryclientradiusfreeradius

FreeRadius dictionary loading


I'm trying to load a dictionary that comes in with Debian Squeeze. Unfortunately radius-client library fails on some included file with:

rc_read_dictionary: unknown Vendor-Id encrypt=1 on line 7 of dictionary /usr/share/freeradius/dictionary.compat

The line is

ATTRIBUTE       Password                                2       string  encrypt=1

Freeradius is installed from the package, so I assume this should work just fine... What could be the problem here?


Solution

  • Late answer, but it still might help others, I got bit by a related issue.

    You're getting that error because you're trying to use a dictionary file designed for the FreeRADIUS server. The client library "freeradius-client" is not 100% compatible with that format. Specifically, in your case, it cannot handle the encrypt=1 property of the attribute.

    The reason for the complaint about an unknown Vendor-Id is another incompatibility between FreeRADIUS server and the freeradius-client library. FreeRADIUS server expects dictionary files with vendor specific attributes (VSAs) like the following:

    VENDOR        Cisco           9
    BEGIN-VENDOR  Cisco
    ATTRIBUTE     Cisco-AVPair    1  string
    ATTRIBUTE     Cisco-NAS-Port  2  string
    ...
    END-VENDOR    Cisco
    

    The freeradius-client library however can only parse VSAs in the following form:

    VENDOR        Cisco           9
    ATTRIBUTE     Cisco-AVPair    1  string  vendor=Cisco
    ATTRIBUTE     Cisco-NAS-Port  2  string  vendor=Cisco
    

    The above is true for FreeRADIUS server v2.1.x and freeradius-client v1.1.6.