FreeRadius 3.0简单安装测试失败

问题描述 投票:0回答:1

我从各自的软件存储库(dnf、apt)在 Linux(F38 和 Ubuntu 20.4)上安装 FreeRadius v 3.0.20,但无法使用用户名和密码进行最简单的自测试。
该过程在“入门”wiki 中进行了描述。基本上,它是编辑“users”文件并添加具有明文密码的用户。然后在本地主机上启动 Radius 服务器。然后使用这些用户名和密码运行他们的实用程序

radtest
,它应该会成功。

除了两次尝试中它没有类似的行为(Fedora 和 Ubuntu)。

FreeRadius“入门”指南是否已过时,或者我遗漏了一些明显的东西?

详情:

  • 安装后,我使用 sudo 并编辑
    users
    文件(Fedora 与 Ubuntu 中的不同位置),添加以下内容:
    tester Cleartext-Password := "secret"
  • 运行服务器:
    sudo freeradius -X -xx -i 127.0.0.1 -p 1645
  • 在另一个终端中,运行:
    radtest -x -4 t eap-md5 tester secret 127.0.0.1:1645 0 testing123
  • 得到这个:
Sent Access-Request Id 36 from 0.0.0.0:50449 to 127.0.0.1:1645 length 69
        User-Name = "tester"
        Cleartext-Password = "secret"
        NAS-IP-Address = 127.0.1.1
        NAS-Port = 0
        Message-Authenticator = 0x00
        EAP-Code = Response
        EAP-Type-Identity = 0x4a49473436
        EAP-Message = 0x0271000a014a49473436
failed decoding EAP: EAP-Message not found
Transaction: 0, received packet (id: 36).
Received Access-Reject Id 36 from 127.0.0.1:1645 to 0.0.0.0:50449 length 20
EAP transaction finished, but reply is not an Access-AcceptDeallocating (sockfd: 5, id: 36)

在服务器日志中获取此内容:

Mon Aug 14 17:36:54 2023 : Debug: (0) Received Access-Request Id 36 from 127.0.0.1:50449 to 127.0.0.1:1645 length 69
Mon Aug 14 17:36:54 2023 : Debug: (0)   User-Name = "tester"
Mon Aug 14 17:36:54 2023 : Debug: (0)   NAS-IP-Address = 127.0.1.1
Mon Aug 14 17:36:54 2023 : Debug: (0)   NAS-Port = 0
Mon Aug 14 17:36:54 2023 : Debug: (0)   Message-Authenticator = 0x75a83521d32f7707cc160bf43d15fc04
Mon Aug 14 17:36:54 2023 : Debug: (0)   EAP-Message = 0x0271000a014a49473436
Mon Aug 14 17:36:54 2023 : Debug: (0) session-state: No State attribute
Mon Aug 14 17:36:54 2023 : Debug: (0) Empty authorize section.  Using default return values.
Mon Aug 14 17:36:54 2023 : ERROR: (0) No Auth-Type found: rejecting the user via Post-Auth-Type = Reject
Mon Aug 14 17:36:54 2023 : Debug: (0) Failed to authenticate the user
Mon Aug 14 17:36:54 2023 : Debug: (0) Using Post-Auth-Type Reject
Mon Aug 14 17:36:54 2023 : Debug: (0) Post-Auth-Type sub-section not found.  Ignoring.
Mon Aug 14 17:36:54 2023 : Debug: (0) Delaying response for 1.000000 seconds
Mon Aug 14 17:36:54 2023 : Debug: Waking up in 0.3 seconds.
Mon Aug 14 17:36:54 2023 : Debug: Waking up in 0.6 seconds.
Mon Aug 14 17:36:55 2023 : Debug: (0) Sending delayed response
Mon Aug 14 17:36:55 2023 : Debug: (0) Sent Access-Reject Id 36 from 127.0.0.1:1645 to 127.0.0.1:50449 length 20
Mon Aug 14 17:36:55 2023 : Debug: Waking up in 3.9 seconds.
Mon Aug 14 17:36:59 2023 : Debug: (0) Cleaning up request packet ID 36 with timestamp +20
Mon Aug 14 17:36:59 2023 : Info: Ready to process requests

所以看起来服务器甚至没有尝试启动 eap 握手。

通过谷歌搜索,“无状态属性”不是错误。
我不明白的是“空授权部分”。完整的服务器日志清楚地显示了配置中的授权部分(未触及,如安装的那样)。可以提供完整的日志。

类似的问题,未回答并放弃:thisthis

想法?

freeradius
1个回答
0
投票

通过 freeradius 邮件列表收到答案 - 感谢 Alan DeKok。

以下是我的总结,供以后可能偶然发现相同问题的人使用:

  • 3.0.20 版本对他们来说太旧了;建议安装最近的预构建包,在他们的主网站和wiki上引用
    • Fedora 的软件包目前仅在 wiki 中列出。从软件包列表中,您只需要第一个和
      freeradius-utils-...
  • 安装在 Fedora 上对我来说没有任何问题。除了
    radiusd
    抱怨找不到服务器证书。要解决此问题,请转到
    /etc/raddb/certs
    sudo make all
  • 安装时的默认配置仅适用于 localhost,如果服务器使用默认地址和端口运行(这意味着没有 -i
    -p
    args。甚至
    -i 127.0.0.1 -p 1812
    都没有。)。否则,服务器将找不到它的腿和手臂,并且会因无用的调试喷出而悲惨地失败。
    然后
  • radtest
  • 命令成功。
    在服务器日志中,查找 
    # Executing section authorize ...
    - 这将启动服务器对请求的实际思考。
    
    
  • 测试成功看起来是这样的:

pap: Comparing with "known good" Cleartext-Password "secret" (6) Debug: (2) pap: User authenticated successfully Debug: (2) modsingle[authenticate]: returned from pap (rlm_pap) Debug: (2) [pap] = ok Debug: (2) } # Auth-Type PAP = ok

© www.soinside.com 2019 - 2024. All rights reserved.