免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
12下一页
最近访问板块 发新帖
查看: 17130 | 回复: 12
打印 上一主题 下一主题

请教一个freeradius的问题,谢谢。 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2009-02-05 19:12 |只看该作者 |倒序浏览
最近在玩FreeRadius,有个问题向大家请教,详述如下:
fedora下配置FreeRadius,采用users进行验证;
使用系统用户/密码,验证可以通过;
编辑users,在其中添加test1用户,则验证失败。
不知原因出在哪里?

  1. [root@Radius raddb]# radiusd -v
  2. radiusd: FreeRADIUS Version 2.1.3, for host i686-pc-linux-gnu, built on Jan 24 2009 at 17:21:45
  3. Copyright (C) 1999-2008 The FreeRADIUS server project and contributors.
  4. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
  5. PARTICULAR PURPOSE.
  6. You may redistribute copies of FreeRADIUS under the terms of the
  7. GNU General Public License.
  8. For more information about these matters, see the file named COPYRIGHT.
  9. [root@Radius raddb]#
复制代码




使用系统用户authen时。
  1. [root@Radius ~]#   radtest test test 127.0.0.1:1812 2001 testing123  
  2. Sending Access-Request of id 75 to 127.0.0.1 port 1812
  3.         User-Name = "test"
  4.         User-Password = "test"
  5.         NAS-IP-Address = 127.0.0.1
  6.         NAS-Port = 2001
  7. rad_recv: Access-Accept packet from host 127.0.0.1 port 1812, id=75, length=20
  8. [root@Radius ~]#
复制代码

radius -X,启动debug模式无报错,输出如下。
  1. rad_recv: Access-Request packet from host 127.0.0.1 port 37646, id=75, length=56
  2.         User-Name = "test"
  3.         User-Password = "test"
  4.         NAS-IP-Address = 127.0.0.1
  5.         NAS-Port = 2001
  6. +- entering group authorize {...}
  7. ++[preprocess] returns ok
  8. ++[chap] returns noop
  9. ++[mschap] returns noop
  10. [suffix] No '@' in User-Name = "test", looking up realm NULL
  11. [suffix] No such realm "NULL"
  12. ++[suffix] returns noop
  13. [eap] No EAP-Message, not doing EAP
  14. ++[eap] returns noop
  15. ++[unix] returns updated
  16. ++[files] returns noop
  17. ++[expiration] returns noop
  18. ++[logintime] returns noop
  19. ++[pap] returns updated
  20. Found Auth-Type = PAP
  21. +- entering group PAP {...}
  22. [pap] login attempt with password "test"
  23. [pap] Using CRYPT encryption.
  24. [pap] User authenticated successfully
  25. ++[pap] returns ok
  26. +- entering group post-auth {...}
  27. ++[exec] returns noop
  28. Sending Access-Accept of id 75 to 127.0.0.1 port 37646
  29. Finished request 1.
  30. Going to the next request
  31. Waking up in 4.9 seconds.
  32. Cleaning up request 1 ID 75 with timestamp +107
  33. Ready to process requests.
复制代码


---------------------------------------------------------------------------------------
使用users验证时:

在users中添加如下:
  1. "test1" Auth-Type = Local,Password == "test1"
  2.         Fall-Through = Yes
复制代码


radius -X,启动debug模式无报错,输出如下。

  1. [root@Radius ~]#   radtest test1 test1 127.0.0.1:1812 2001 testing123
  2. Sending Access-Request of id 50 to 127.0.0.1 port 1812
  3.         User-Name = "test1"
  4.         User-Password = "test1"
  5.         NAS-IP-Address = 127.0.0.1
  6.         NAS-Port = 2001
  7. rad_recv: Access-Reject packet from host 127.0.0.1 port 1812, id=50, length=20
  8. [root@Radius ~]#
复制代码

  1.     rad_recv: Access-Request packet from host 127.0.0.1 port 52926, id=50, length=57
  2.         User-Name = "test1"
  3.         User-Password = "test1"
  4.         NAS-IP-Address = 127.0.0.1
  5.         NAS-Port = 2001
  6. +- entering group authorize {...}
  7. ++[preprocess] returns ok
  8. ++[chap] returns noop
  9. ++[mschap] returns noop
  10. [suffix] No '@' in User-Name = "test1", looking up realm NULL
  11. [suffix] No such realm "NULL"
  12. ++[suffix] returns noop
  13. [eap] No EAP-Message, not doing EAP
  14. ++[eap] returns noop
  15. ++[unix] returns notfound
  16. WARNING: Found User-Password == "...".
  17. WARNING: Are you sure you don't mean Cleartext-Password?
  18. WARNING: See "man rlm_pap" for more information.
  19. [files] users: Matched entry test1 at line 61
  20. ++[files] returns ok
  21. ++[expiration] returns noop
  22. ++[logintime] returns noop
  23. [pap] WARNING! No "known good" password found for the user.  Authentication may fail because of this.
  24. ++[pap] returns noop
  25. Found Auth-Type = Local
  26. WARNING: Please update your configuration, and remove 'Auth-Type = Local'
  27. WARNING: Use the PAP or CHAP modules instead.
  28. No "known good" password was configured for the user.
  29. As a result, we cannot authenticate the user.
  30. Failed to authenticate the user.
  31. Using Post-Auth-Type Reject
  32. +- entering group REJECT {...}
  33. [attr_filter.access_reject]     expand: %{User-Name} -> test1
  34. attr_filter: Matched entry DEFAULT at line 11
  35. ++[attr_filter.access_reject] returns updated
  36. Delaying reject of request 2 for 1 seconds
  37. Going to the next request
  38. Waking up in 0.9 seconds.
  39. Sending delayed reject for request 2
  40. Sending Access-Reject of id 50 to 127.0.0.1 port 52926
  41. Waking up in 4.9 seconds.
  42. Cleaning up request 2 ID 50 with timestamp +418
  43. Ready to process requests.
复制代码

[ 本帖最后由 hjp0021 于 2009-2-5 19:13 编辑 ]

论坛徽章:
0
2 [报告]
发表于 2009-02-06 02:02 |只看该作者
已经搞定了,是users文件的语法问题,修改后就OK。

论坛徽章:
0
3 [报告]
发表于 2009-05-19 14:28 |只看该作者
麻烦请教下LZ,具体问题是什么?我也出现这样的问题了.
另外为什么验证的时候,里面出现的NAS-IP-ADDRESS会是一个公网地址,而不是127.0.0.1的?
我刚make install,然后创建了账户就测试的.

论坛徽章:
0
4 [报告]
发表于 2009-12-01 19:30 |只看该作者
也遇到同样问题了,请楼主解答

论坛徽章:
381
CU十二周年纪念徽章
日期:2014-01-04 22:46:58CU大牛徽章
日期:2013-03-13 15:32:35CU大牛徽章
日期:2013-03-13 15:38:15CU大牛徽章
日期:2013-03-13 15:38:52CU大牛徽章
日期:2013-03-14 14:08:55CU大牛徽章
日期:2013-04-17 11:17:19CU大牛徽章
日期:2013-04-17 11:17:32CU大牛徽章
日期:2013-04-17 11:17:37CU大牛徽章
日期:2013-04-17 11:17:42CU大牛徽章
日期:2013-04-17 11:17:47CU大牛徽章
日期:2013-04-17 11:17:52CU大牛徽章
日期:2013-04-17 11:17:56
5 [报告]
发表于 2009-12-01 21:39 |只看该作者
楼主把解决过程写下来

论坛徽章:
0
6 [报告]
发表于 2009-12-02 08:10 |只看该作者
强烈支持!

论坛徽章:
0
7 [报告]
发表于 2009-12-15 12:58 |只看该作者

能否具体说说USERS 如何正确添加用户,谢谢。

能否具体说说USERS 如何正确添加用户,谢谢。

论坛徽章:
0
8 [报告]
发表于 2009-12-15 14:09 |只看该作者

回复 #1 hjp0021 的帖子

使用文本方式测试 仅需要取消文件中的注释信息

论坛徽章:
0
9 [报告]
发表于 2009-12-15 14:35 |只看该作者

回复 #7 coffee777 的帖子

coffee777    能不能把你得users文件发到我得邮箱2002goods@163.com,登陆你得MSN,交流哈

论坛徽章:
0
10 [报告]
发表于 2009-12-15 15:42 |只看该作者
test1  Cleartext-Password := "test"
       Service-Type = Framed-User,
       Framed-Protocol = PPP,
       Framed-IP-Address = 255.255.255.254,
       Framed-IP-Netmask = 255.255.255.0
DEFAULT Framed-Protocol == PPP
        Framed-Protocol = PPP,
        Framed-Compression = Van-Jacobson-TCP-IP
DEFAULT Hint == "CSLIP"
        Framed-Protocol = SLIP,
        Framed-Compression = Van-Jacobson-TCP-IP
DEFAULT Hint == "SLIP"
        Framed-Protocol = SLIP

我的users文件,希望对你有帮助

[ 本帖最后由 coffee777 于 2009-12-15 15:53 编辑 ]
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP