Python "import" statement fails for any module in /site-packages/ when run by radiusd from example.py

Jorge Pereira jpereira at freeradius.org
Thu Mar 12 19:06:40 CET 2020


Hi,

Which version are you running? Because it was fixed a few months ago and It only will be available on next 3.0.21. But, you could build your own version from the latest code base in https://github.com/FreeRADIUS/freeradius-server/commits/v3.0.x <https://github.com/FreeRADIUS/freeradius-server/commits/v3.0.x> and see if your tests will work fine.

---
Jorge Pereira
jpereira at freeradius.org




> On 12 Mar 2020, at 14:58, Gleb Lisikh <in4bit.general at gmail.com> wrote:
> 
> Before I go into exact code, paths, version etc. any general advice or
> troubleshooting steps for figuring out why python import statement fails to
> execute for any python library I try to call for
> from /etc/raddb/mods-config/python/example.py?
> 
>   - example.py runs fine for other python statements
>   - I can do "import sys" and it works fine, but sys is a built in python
>   module
>   - I can execute "import" for any python module defined
>   under /usr/lib/python2.7/site-packages/ in python environment under radiusd
>   users (e.g. sudo -u radiusd python)
> 
> I am very amateur when it comes to linuz, so please bear with me...
> 
> Thank you!
> 
> Gleb Lisikh
> -
> List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html



More information about the Freeradius-Users mailing list