accounting { if (Acct-Status-Type == Start) { update reply { Tmp-String-0 = "%{exec:/etc/freeradius/SCRIPT/userlogin.py %{User-Name}}" } } if (Acct-Status-Type == Stop) { update reply { Tmp-String-0 = "%{exec:/etc/freeradius/SCRIPT/userlogout.py %{User-Name}}" } }
You can replace call to exec module by call to sql: Tmp-String-0 = "%{sql:UPDATE whatever}" Current server versions should support UPDATEs and INSERTs as well as SELECTs which vere only ones supported in early 2.x versions.
I need to launch a script with after login and logout.
Maybe this script cause some problems? It's a simple python script that update a field in db (online/offiline flag).
Do you need that at all? Instead of calling the database to see if the flag (wherever you are using it) is set you can make a query that checks if user is online. Ivan Kalik Kalik Informatika ISP