Open monelgordillo opened 4 years ago
Do you have a RADIUS dictionary in your current folder? If not you either need one or adjust srv = Client(server="x.x.x.x", secret=b"XXXXX", dict=Dictionary("dictionary"))
to srv = Client(server="x.x.x.x", secret=b"XXXXX", dict=Dictionary("/location/to/my/dictionary"))
. Usually the dictionary is either self contained or $INCLUDE
s other dictionary files.
You can find a small dictionary in https://github.com/pyradius/pyrad/tree/master/example/dictionary . This dictionary contain "only" RADIUS Attributes from RFC 2865 and/or RFC 2866.
For more RFC Attributes or Vendor specific Attributes check out the dictionaries from FreeRADIUS: https://github.com/redBorder/freeradius/tree/master/share .
I had to update the auth example like this:
import os
THIS_FOLDER = os.path.dirname(os.path.abspath(__file__))
dictionary_file = os.path.join(THIS_FOLDER,'dictionary')
print(dictionary_file)
srv = Client(server="x.x.x.x", secret=b"xxxx", dict=Dictionary(dictionary_file))
Hello,
I ask for forgiveness ahead of time. I'm a python newbie.
I installed pyrad via: pip install pyrad
I'm getting this when I run the example (with server/server info updated):
This is the python file: