Search This Blog

Monday 15 March 2021

Radius authicatication using py-radius

  pip install py-radius


$ python -m radius
Host [default: 'radius']: 1.1.1.1
Port [default: 1812]: 1812
Enter RADIUS Secret: s3cr3t
Enter your username: foobar
Enter your password: qux
...
Authentication Successful


For Python3 an error message may be triggered:
  File "/home/user/venv-folder/lib/python3.8/site-packages/radius.py", line 583, in main
    host = raw_input("Host [default: 'radius']: ")
    NameError: name 'raw_input' is not defined

This is because Python3 uses "input" instead of "raw_input"

Editing the file "radius.py" and replacing "raw_input" with "input" fixes the issue. This is a quick fix but a long term solution should be used. This would be using a library written for Python3.

No comments:

Post a Comment

Nornir Compliance Check