简体   繁体   English

Freeradius acct_unique模块软件包在OpenWrt CC-15.05.1上不可用

[英]Freeradius acct_unique module package not available on OpenWrt CC-15.05.1

I'm running Openwrt CHAOS CALMER (15.05.1, r48532) on my linksys WRT1900AC V1 (mamba - mvebu platform). 我在Linksys WRT1900AC V1(mamba-mvebu平台)上运行Openwrt CHAOS CALMER(15.05.1,r48532)。

I have installed freeradius server version 2.2.8, i'm facing troubles with the acct unique session id which is all the time empty: 我已经安装了freeradius服务器版本2.2.8,但是我遇到的问题是acct唯一会话ID一直都是空的:

rlm_sql_mysql: MYSQL check_error: 1062 received
[sql] Couldn't insert SQL accounting STOP record - Duplicate entry '' for 
key 'acctuniqueid'
rlm_sql_mysql: MYSQL check_error: 1062 received
rlm_sql_mysql: Cannot store result
rlm_sql_mysql: MySQL error 'Duplicate entry '' for key 'acctuniqueid''
rlm_sql (sql): Released sql socket id: 9
++[sql] = fail
+} # group accounting = fail
Finished request 21.
Cleaning up request 21 ID 5 with timestamp +1271
Going to the next request
Ready to process requests.

Reading the freeradius mailing list it seems that the only solution is to use the "acct_unique" module which is not available for download using the opkg install tool from OpenWrt console. 阅读freeradius邮件列表,似乎唯一的解决方案是使用“ acct_unique”模块,该模块无法从OpenWrt控制台使用opkg安装工具进行下载。 I beg any one who have this package (ipk already compiled for the mvebu platform) or he have the OpenWrt build system and he can cross compile this module to help me sort my issue by helping me to get this module for my platform. 我恳求任何拥有此软件包(ipk已经为mvebu平台编译过)的人,或者他拥有OpenWrt构建系统,他可以交叉编译该模块,以帮助我为自己的平台获取此模块,从而帮助解决问题。

Any other alternative solutions to sort out this problem using shell scripting call from the freeradius daemon are welcome. 欢迎使用任何其他替代解决方案,这些解决方案均使用来自freeradius守护程序的shell脚本调用来解决此问题。

Here is the list of packages available for freeradius : 以下是可用于freeradius的软件包列表:

root@OpenWrt:~# opkg find '*freeradius*' freeradius2 - 2.2.8-2 - A flexible RADIUS server (version 2) freeradius2-common - 2.2.8-2 - common files freeradius2-democerts - 2.2.8-2 - Demo certificates to test the server freeradius2-mod-always - 2.2.8-2 - Always module freeradius2-mod-attr-filter - 2.2.8-2 - ATTR filter module freeradius2-mod-attr-rewrite - 2.2.8-2 - ATTR rewrite module freeradius2-mod-chap - 2.2.8-2 - CHAP module freeradius2-mod-detail - 2.2.8-2 - Detailed accounting module freeradius2-mod-eap - 2.2.8-2 - Base EAP module freeradius2-mod-eap-gtc - 2.2.8-2 - EAP/GTC module freeradius2-mod-eap-md5 - 2.2.8-2 - EAP/MD5 module freeradius2-mod-eap-mschapv2 - 2.2.8-2 - EAP/MS-CHAPv2 module freeradius2-mod-eap-peap - 2.2.8-2 - EAP/PEAP module freeradius2-mod-eap-tls - 2.2.8-2 - EAP/TLS module freeradius2-mod-eap-ttls - 2.2.8-2 - EAP/TTLS module freeradius2-mod-exec - 2.2.8-2 - EXEC module freeradius2-mod-expiration - 2.2.8-2 - Expiration module freeradius2-mod-expr - 2.2.8-2 - EXPR module freeradius2-mod-files - 2.2.8-2 - Module using local files for authorization freeradius2-mod-ldap - 2.2.8-2 - LDAP module freeradius2-mod-logintime - 2.2.8-2 - Logintime module freeradius2-mod-mschap - 2.2.8-2 - MS-CHAP and MS-CHAPv2 module freeradius2-mod-pap - 2.2.8-2 - PAP module freeradius2-mod-passwd - 2.2.8-2 - Rlm passwd module freeradius2-mod-preprocess - 2.2.8-2 - Request pre-processing module freeradius2-mod-radutmp - 2.2.8-2 - Radius UTMP module freeradius2-mod-realm - 2.2.8-2 - Realms handling module freeradius2-mod-sql - 2.2.8-2 - Base SQL module freeradius2-mod-sql-mysql - 2.2.8-2 - MySQL module freeradius2-mod-sql-pgsql - 2.2.8-2 - PostgreSQL module freeradius2-mod-sql-sqlite - 2.2.8-2 - SQLite module freeradius2-mod-sqlcounter - 2.2.8-2 - Generic SQL Counter module freeradius2-mod-sqllog - 2.2.8-2 - SQL Logging module freeradius2-utils - 2.2.8-2 - Misc. client utilities

Kind regards 亲切的问候

Edit raddb/policy.conf 编辑raddb/policy.conf

Add

acct_unique {
    update request {
            Acct-Unique-Session-Id := "%{md5:%{User-Name},%{Acct-Session-ID},%{NAS-IP-Address},%{NAS-Identifier},%{NAS-Port-ID},%{NAS-Port}}"
    }
}

You can then add a call to acct_unique in raddb/sites-available/default at the top of the preacct {} section, to generate the Acct-Unique-Session-ID attribute. 然后,您可以在preacct {}部分顶部的raddb/sites-available/default中添加对acct_unique的调用,以生成Acct-Unique-Session-ID属性。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM