精華區 > 酷!學園 精華區

安裝 FreeRADIUS + Files + MySQL 認證

<< < (5/5)

klees:
用radtest 測試完全成功,可是使用其他命令的時候卻不行,如使用radacct或radlogin等請問是為什么?謝謝!
而mysql是正常的
提示如下
==================================
rad_recv: Access-Request packet from host 127.0.0.1:32830, id=209, length=62
Sending Access-Reject of id 208 to 127.0.0.1 port 32829
        Service-Type = Login-User
        User-Name = "heyu"
        User-Password = "\272\020\330\206\226u\n\302\365\204\304E\343|\306\231"
        NAS-Port = 0
        NAS-IP-Address = 127.0.0.1
rlm_sql (sql): Reserving sql socket id: 4
rlm_sql_mysql: query:  SELECT id, UserName, Attribute, Value, op           FROM radcheck           WHERE Username = 'heyu'           ORDER BY id
rlm_sql_mysql: query:  SELECT radgroupcheck.id,radgroupcheck.GroupName,radgroupcheck.Attribute,radgroupcheck.Value,radgroupcheck.op  FROM radgroupcheck,usergroup WHERE usergroup.Username = 'heyu' AND usergroup.GroupName = radgroupcheck.GroupName ORDER BY radgroupcheck.id
rlm_sql_mysql: query:  SELECT id, UserName, Attribute, Value, op           FROM radreply           WHERE Username = 'heyu'           ORDER BY id
rlm_sql_mysql: query:  SELECT radgroupreply.id,radgroupreply.GroupName,radgroupreply.Attribute,radgroupreply.Value,radgroupreply.op  FROM radgroupreply,usergroup WHERE usergroup.Username = 'heyu' AND usergroup.GroupName = radgroupreply.GroupName ORDER BY radgroupreply.id
rlm_sql (sql): Released sql socket id: 4
rlm_sql (sql): No matching entry in the database for request from user [heyu]
rad_recv: Access-Request packet from host 127.0.0.1:32830, id=209, length=62
Sending Access-Reject of id 209 to 127.0.0.1 port 32830
==================================

ikenny:
我的環境是 CentOS5.3 利用 yum 安裝 freeradius 及 freeradius-mysql ,參照你的設定,得到如下訊息,可否協助找出問題所在

/usr/sbin/radiusd -X


[root@radius sbin]# radtest testx testx localhost 0 testing123
Sending Access-Request of id 232 to 127.0.0.1 port 1812
        User-Name = "testx"
        User-Password = "testx"
        NAS-IP-Address = 255.255.255.255
        NAS-Port = 0
Re-sending Access-Request of id 232 to 127.0.0.1 port 1812
        User-Name = "testx"
        User-Password = "testx"
        NAS-IP-Address = 255.255.255.255
        NAS-Port = 0
Re-sending Access-Request of id 232 to 127.0.0.1 port 1812
        User-Name = "testx"
        User-Password = "testx"
        NAS-IP-Address = 255.255.255.255
        NAS-Port = 0
Re-sending Access-Request of id 232 to 127.0.0.1 port 1812
        User-Name = "testx"
        User-Password = "testx"
        NAS-IP-Address = 255.255.255.255
        NAS-Port = 0
Re-sending Access-Request of id 232 to 127.0.0.1 port 1812
        User-Name = "testx"
        User-Password = "testx"
        NAS-IP-Address = 255.255.255.255
        NAS-Port = 0
Re-sending Access-Request of id 232 to 127.0.0.1 port 1812
        User-Name = "testx"
        User-Password = "testx"
        NAS-IP-Address = 255.255.255.255
        NAS-Port = 0
Re-sending Access-Request of id 232 to 127.0.0.1 port 1812
        User-Name = "testx"
        User-Password = "testx"
        NAS-IP-Address = 255.255.255.255
        NAS-Port = 0
Re-sending Access-Request of id 232 to 127.0.0.1 port 1812
        User-Name = "testx"
        User-Password = "testx"
        NAS-IP-Address = 255.255.255.255
        NAS-Port = 0
Re-sending Access-Request of id 232 to 127.0.0.1 port 1812
        User-Name = "testx"
        User-Password = "testx"
        NAS-IP-Address = 255.255.255.255
        NAS-Port = 0
Re-sending Access-Request of id 232 to 127.0.0.1 port 1812
        User-Name = "testx"
        User-Password = "testx"
        NAS-IP-Address = 255.255.255.255
        NAS-Port = 0
radclient: no response from server for ID 232
[root@radius sbin]# radtest test test localhost 0 testing123
Sending Access-Request of id 238 to 127.0.0.1 port 1812
        User-Name = "test"
        User-Password = "test"
        NAS-IP-Address = 255.255.255.255
        NAS-Port = 0
Re-sending Access-Request of id 238 to 127.0.0.1 port 1812
        User-Name = "test"
        User-Password = "test"
        NAS-IP-Address = 255.255.255.255
        NAS-Port = 0
Re-sending Access-Request of id 238 to 127.0.0.1 port 1812
        User-Name = "test"
        User-Password = "test"
        NAS-IP-Address = 255.255.255.255
        NAS-Port = 0
Re-sending Access-Request of id 238 to 127.0.0.1 port 1812
        User-Name = "test"
        User-Password = "test"
        NAS-IP-Address = 255.255.255.255
        NAS-Port = 0
Re-sending Access-Request of id 238 to 127.0.0.1 port 1812
        User-Name = "test"
        User-Password = "test"
        NAS-IP-Address = 255.255.255.255
        NAS-Port = 0
Re-sending Access-Request of id 238 to 127.0.0.1 port 1812
        User-Name = "test"
        User-Password = "test"
        NAS-IP-Address = 255.255.255.255
        NAS-Port = 0
Re-sending Access-Request of id 238 to 127.0.0.1 port 1812
        User-Name = "test"
        User-Password = "test"
        NAS-IP-Address = 255.255.255.255
        NAS-Port = 0
Re-sending Access-Request of id 238 to 127.0.0.1 port 1812
        User-Name = "test"
        User-Password = "test"
        NAS-IP-Address = 255.255.255.255
        NAS-Port = 0
Re-sending Access-Request of id 238 to 127.0.0.1 port 1812
        User-Name = "test"
        User-Password = "test"
        NAS-IP-Address = 255.255.255.255
        NAS-Port = 0
Re-sending Access-Request of id 238 to 127.0.0.1 port 1812
        User-Name = "test"
        User-Password = "test"
        NAS-IP-Address = 255.255.255.255
        NAS-Port = 0
radclient: no response from server for ID 238

ikenny:
[root@u8 raddb]# radtest ttt ttt localhost 0 testing123
Sending Access-Request of id 162 to 127.0.0.1 port 1812
        User-Name = "ttt"
        User-Password = "ttt"
        NAS-IP-Address = 255.255.255.255
        NAS-Port = 0
rad_recv: Access-Accept packet from host 127.0.0.1:1812, id=162, length=32
        Reply-Message = "Hello, ttt"

以上file認證測試,可以通過,但是透過mysql認證如下:

[root@u8 raddb]# radtest test test localhost 0 testing123
Sending Access-Request of id 178 to 127.0.0.1 port 1812
        User-Name = "test"
        User-Password = "test"
        NAS-IP-Address = 255.255.255.255
        NAS-Port = 0
rad_recv: Access-Reject packet from host 127.0.0.1:1812, id=178, length=20

請教問題出在哪?感恩

vincent119:
http://vincent119.blogspot.tw/2012/11/radius-server-mysql-replication.html


我是這樣搞的!!!

導覽

[0] 文章列表

[*] 上頁

前往完整版本