Re: Scripts executing in acct_users file
Hm, I've done it but now when I'm running radiusd -X it shows: Module: Checking accounting {...} for more modules to load /usr/local/etc/raddb/sites-enabled/default[325]: Failed to load module "exe_module". /usr/local/etc/raddb/sites-enabled/default[323]: Errors parsing accounting section. After that I've tried also to create a file named exe_module in /raddb/modules with: exe_module { wait = yes program = "/usr/local/etc/raddb/aaa_pdsn.sh" input_pairs = request output_pairs = reply shell_escape = yes output = none } but than radiusd -X shows: Module: Checking accounting {...} for more modules to load /usr/local/etc/raddb/modules/exec_module[1]: Failed to link to module 'rlm_exe_module': file not found /usr/local/etc/raddb/sites-enabled/default[325]: Failed to load module "exe_module". /usr/local/etc/raddb/sites-enabled/default[323]: Errors parsing accounting section. 09.07.2010 13:13, Toure Mamadou написав(ла):
Hi, First: create an exec module in radiusd.conf For exemple : exec exe_module { wait = yes program = "path to your prograù" input_pairs = request output_pairs = reply shell_escape = yes output = none
}
Second: edit the site-available/default to add the module name to accounting section.
accounting { exe_module .......... # # Create a 'detail'ed log of the packets. # Note that accounting requests which are proxied # are also logged in the detail file. detail ........... }
Hoppe it'll helpe Regards.
-----Message d'origine----- De : freeradius-users-bounces+mamadou.toure=vipnet.ci@lists.freeradius.org [mailto:freeradius-users-bounces+mamadou.toure=vipnet.ci@lists.freeradius.or g] De la part de Eugen Vakulenko Envoyé : vendredi 9 juillet 2010 08:53 À : freeradius-users@lists.freeradius.org Objet : Scripts executing in acct_users file
Hi all!
I've just upgraded from 1.1.6 to 2.1.9. On the old server I'm used Start/Stop and Interim-Update in acct_users file to execute some script in this way:
DEFAULT Acct-Status-Type == Start Exec-Program = "/usr/local/etc/raddb/aaa_pdsn.sh" DEFAULT Acct-Status-Type == Interim-Update Exec-Program = "/usr/local/etc/raddb/aaa_pdsn.sh" DEFAULT Acct-Status-Type == Stop Exec-Program = "/usr/local/etc/raddb/aaa_pdsn.sh"
But when I try it on the new server it seems it doesnt work. exec is enabled:
Optimus# less /usr/local/etc/raddb/sites-enabled/default ... post-auth {
# main_pool # reply_log # sql # sql_log # ldap exec # wimax Post-Auth-Type REJECT { attr_filter.access_reject } }
What is the best way to make it work?
- List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
- List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
Eugen Vakulenko wrote:
Hm, I've done it but now when I'm running radiusd -X it shows:
Module: Checking accounting {...} for more modules to load /usr/local/etc/raddb/sites-enabled/default[325]: Failed to load module "exe_module".
Does the debug output show that it's loading the file containing the module configuration? Where did you put the configuration?
After that I've tried also to create a file named exe_module in /raddb/modules with:
exe_module {
That won't work. Alan DeKok.
09.07.2010 15:03, Alan DeKok написав(ла):
Does the debug output show that it's loading the file containing the module configuration?
I don't know exactly. As I understand it shows that it is loading additional modules. End of debug output: rlm_sql (sql): Driver rlm_sql_mysql (module rlm_sql_mysql) loaded and linked rlm_sql (sql): Attempting to connect to helpdesk@localhost:/radiuspdsn rlm_sql (sql): starting 0 rlm_sql (sql): Attempting to connect rlm_sql_mysql #0 rlm_sql_mysql: Starting connect to MySQL server for #0 rlm_sql (sql): Connected new DB handle, #0 rlm_sql (sql): starting 1 rlm_sql (sql): Attempting to connect rlm_sql_mysql #1 rlm_sql_mysql: Starting connect to MySQL server for #1 rlm_sql (sql): Connected new DB handle, #1 rlm_sql (sql): starting 2 rlm_sql (sql): Attempting to connect rlm_sql_mysql #2 rlm_sql_mysql: Starting connect to MySQL server for #2 rlm_sql (sql): Connected new DB handle, #2 rlm_sql (sql): starting 3 rlm_sql (sql): Attempting to connect rlm_sql_mysql #3 rlm_sql_mysql: Starting connect to MySQL server for #3 rlm_sql (sql): Connected new DB handle, #3 rlm_sql (sql): starting 4 rlm_sql (sql): Attempting to connect rlm_sql_mysql #4 rlm_sql_mysql: Starting connect to MySQL server for #4 rlm_sql (sql): Connected new DB handle, #4 Module: Checking preacct {...} for more modules to load Module: Linked to module rlm_acct_unique Module: Instantiating acct_unique acct_unique { key = "User-Name, Acct-Session-Id, NAS-IP-Address, Client-IP-Address, NAS-Port" } Module: Checking accounting {...} for more modules to load /usr/local/etc/raddb/sites-enabled/default[325]: Failed to load module "exe_module". /usr/local/etc/raddb/sites-enabled/default[323]: Errors parsing accounting section.
Where did you put the configuration?
I've added in /usr/local/etc/raddb/radiusd.conf following section near the end of file: ................................... exec exe_module { wait = yes program = "/usr/local/etc/raddb/aaa_pdsn.sh" input_pairs = request output_pairs = reply shell_escape = yes output = none } $INCLUDE policy.conf $INCLUDE sites-enabled/ #### End of radiusd.conf ##### And than added this to the /usr/local/etc/raddb/sites-enabled/default , "accounting" section accounting { exe_module detail # daily unix radutmp # sradutmp # main_pool # sql # sql_log # pgsql-voip attr_filter.accounting_response } My "acct_users" file: DEFAULT Acct-Status-Type == Start Exec-Program = "/usr/local/etc/raddb/aaa_pdsn.sh" DEFAULT Acct-Status-Type == Interim-Update Exec-Program = "/usr/local/etc/raddb/aaa_pdsn.sh" DEFAULT Acct-Status-Type == Stop Exec-Program = "/usr/local/etc/raddb/aaa_pdsn.sh"
Eugen Vakulenko wrote:
Where did you put the configuration?
I've added in /usr/local/etc/raddb/radiusd.conf following section near the end of file:
<sigh> How about putting it as a *separate file* into the raddb/modules/ directory? That's where the module configuration files are located. Alan DeKok.
Make sure that this line : $INCLUDE sites-enabled/default At the end of your radiusd.conf file -----Message d'origine----- De : freeradius-users-bounces+mamadou.toure=vipnet.ci@lists.freeradius.org [mailto:freeradius-users-bounces+mamadou.toure=vipnet.ci@lists.freeradius.or g] De la part de Alan DeKok Envoyé : vendredi 9 juillet 2010 13:01 À : FreeRadius users mailing list Objet : Re: Scripts executing in acct_users file Eugen Vakulenko wrote:
Where did you put the configuration?
I've added in /usr/local/etc/raddb/radiusd.conf following section near the end of file:
<sigh> How about putting it as a *separate file* into the raddb/modules/ directory? That's where the module configuration files are located. Alan DeKok. - List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
:) Thank you very much! It works. Sorry for such questions, i'm very new in radius. Also thanks to Toure Mamadou! 09.07.2010 16:01, Alan DeKok написав(ла):
Eugen Vakulenko wrote:
Where did you put the configuration?
I've added in /usr/local/etc/raddb/radiusd.conf following section near the end of file:
<sigh> How about putting it as a *separate file* into the raddb/modules/ directory?
That's where the module configuration files are located.
Alan DeKok. - List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
You should make exec exe_module { wait = yes program = "/usr/local/etc/raddb/aaa_pdsn.sh" input_pairs = request output_pairs = reply shell_escape = yes output = none } Not exe_module { wait = yes program = "/usr/local/etc/raddb/aaa_pdsn.sh" input_pairs = request output_pairs = reply shell_escape = yes output = none } Regards. -----Message d'origine----- De : freeradius-users-bounces+mamadou.toure=vipnet.ci@lists.freeradius.org [mailto:freeradius-users-bounces+mamadou.toure=vipnet.ci@lists.freeradius.org] De la part de Eugen Vakulenko Envoyé : vendredi 9 juillet 2010 10:46 À : FreeRadius users mailing list Objet : Re: Scripts executing in acct_users file Hm, I've done it but now when I'm running radiusd -X it shows: Module: Checking accounting {...} for more modules to load /usr/local/etc/raddb/sites-enabled/default[325]: Failed to load module "exe_module". /usr/local/etc/raddb/sites-enabled/default[323]: Errors parsing accounting section. After that I've tried also to create a file named exe_module in /raddb/modules with: exe_module { wait = yes program = "/usr/local/etc/raddb/aaa_pdsn.sh" input_pairs = request output_pairs = reply shell_escape = yes output = none } but than radiusd -X shows: Module: Checking accounting {...} for more modules to load /usr/local/etc/raddb/modules/exec_module[1]: Failed to link to module 'rlm_exe_module': file not found /usr/local/etc/raddb/sites-enabled/default[325]: Failed to load module "exe_module". /usr/local/etc/raddb/sites-enabled/default[323]: Errors parsing accounting section. 09.07.2010 13:13, Toure Mamadou написав(ла):
Hi, First: create an exec module in radiusd.conf For exemple : exec exe_module { wait = yes program = "path to your prograù" input_pairs = request output_pairs = reply shell_escape = yes output = none
}
Second: edit the site-available/default to add the module name to accounting section.
accounting { exe_module .......... # # Create a 'detail'ed log of the packets. # Note that accounting requests which are proxied # are also logged in the detail file. detail ........... }
Hoppe it'll helpe Regards.
-----Message d'origine----- De : freeradius-users-bounces+mamadou.toure=vipnet.ci@lists.freeradius.org [mailto:freeradius-users-bounces+mamadou.toure=vipnet.ci@lists.freeradius.or g] De la part de Eugen Vakulenko Envoyé : vendredi 9 juillet 2010 08:53 À : freeradius-users@lists.freeradius.org Objet : Scripts executing in acct_users file
Hi all!
I've just upgraded from 1.1.6 to 2.1.9. On the old server I'm used Start/Stop and Interim-Update in acct_users file to execute some script in this way:
DEFAULT Acct-Status-Type == Start Exec-Program = "/usr/local/etc/raddb/aaa_pdsn.sh" DEFAULT Acct-Status-Type == Interim-Update Exec-Program = "/usr/local/etc/raddb/aaa_pdsn.sh" DEFAULT Acct-Status-Type == Stop Exec-Program = "/usr/local/etc/raddb/aaa_pdsn.sh"
But when I try it on the new server it seems it doesnt work. exec is enabled:
Optimus# less /usr/local/etc/raddb/sites-enabled/default ... post-auth {
# main_pool # reply_log # sql # sql_log # ldap exec # wimax Post-Auth-Type REJECT { attr_filter.access_reject } }
What is the best way to make it work?
- List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
- List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
- List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
participants (3)
-
Alan DeKok -
Eugen Vakulenko -
Toure Mamadou