Authentication FreeRADIUS RAD客户端和radtest can';t使用PAP登录到服务器
我正在尝试在本地安装FreeRadius服务器,并测试其工作方式是否正确。 我所做的:Authentication FreeRADIUS RAD客户端和radtest can';t使用PAP登录到服务器,authentication,freeradius,radius,Authentication,Freeradius,Radius,我正在尝试在本地安装FreeRadius服务器,并测试其工作方式是否正确。 我所做的: 已下载服务器() 拉开拉链跑了 之后,我尝试按照教程()设置PAP身份验证。基本上我做过: 我已经创建了一个文件“raddb/users”(没有任何扩展名) 放入“用户”文件内容的内部 运行/构建/bin/radiud-x 等待“读取以处理请求” 执行 我也试过了 所以,无论我尝试什么,我都会得到同样的结果。在控制台中,使用我得到的命令: echo "User-Name=bob,Clea
- 我已经创建了一个文件“raddb/users”(没有任何扩展名)
- 放入“用户”文件内容的内部
- 运行/构建/bin/radiud-x
- 等待“读取以处理请求”
- 执行
- 我也试过了
echo "User-Name=bob,Cleartext-Password=hello" | /usr/local/bin/radclient localhost:1812 auth testing123
Sent Access-Request Id 94 from 0.0.0.0:57710 to 127.0.0.1:1812 length 25
Received Access-Reject Id 94 from 127.0.0.1:1812 to 127.0.0.1:57710 length 20
(0) -: Expected Access-Accept got Access-Reject
radtest bob hello localhost 0 testing123
Sent Access-Request Id 89 from 0.0.0.0:61465 to 127.0.0.1:1812 length 73
User-Name = "bob"
User-Password = "hello"
NAS-IP-Address = 192.168.1.175
NAS-Port = 0
Message-Authenticator = 0x00
Cleartext-Password = "hello"
Received Access-Reject Id 89 from 127.0.0.1:1812 to 127.0.0.1:61465 length 20
(0) -: Expected Access-Accept got Access-Reject
在任何情况下(任何命令),我都会在服务器控制台中看到这样的日志:
(4) Received Access-Request Id 204 from 127.0.0.1:63640 to 127.0.0.1:1812 length 73
(4) User-Name = "bob"
(4) User-Password = "hello"
(4) NAS-IP-Address = 192.168.1.175
(4) NAS-Port = 0
(4) Message-Authenticator = 0x248b0163da0492fda522a592111071b8
(4) # Executing section authorize from file /usr/local/etc/raddb/sites-enabled/default
(4) authorize {
(4) policy filter_username {
(4) if (&User-Name) {
(4) if (&User-Name) -> TRUE
(4) if (&User-Name) {
(4) if (&User-Name =~ / /) {
(4) if (&User-Name =~ / /) -> FALSE
(4) if (&User-Name =~ /@[^@]*@/ ) {
(4) if (&User-Name =~ /@[^@]*@/ ) -> FALSE
(4) if (&User-Name =~ /\.\./ ) {
(4) if (&User-Name =~ /\.\./ ) -> FALSE
(4) if ((&User-Name =~ /@/) && (&User-Name !~ /@(.+)\.(.+)$/)) {
(4) if ((&User-Name =~ /@/) && (&User-Name !~ /@(.+)\.(.+)$/)) -> FALSE
(4) if (&User-Name =~ /\.$/) {
(4) if (&User-Name =~ /\.$/) -> FALSE
(4) if (&User-Name =~ /@\./) {
(4) if (&User-Name =~ /@\./) -> FALSE
(4) } # if (&User-Name) = notfound
(4) } # policy filter_username = notfound
(4) [preprocess] = ok
(4) [chap] = noop
(4) [mschap] = noop
(4) [digest] = noop
(4) suffix: Checking for suffix after "@"
(4) suffix: No '@' in User-Name = "bob", looking up realm NULL
(4) suffix: No such realm "NULL"
(4) [suffix] = noop
(4) eap: No EAP-Message, not doing EAP
(4) [eap] = noop
(4) [files] = noop
(4) [expiration] = noop
(4) [logintime] = noop
(4) pap: WARNING: No "known good" password found for the user. Not setting Auth-Type
(4) pap: WARNING: Authentication will fail unless a "known good" password is available
(4) [pap] = noop
(4) } # authorize = ok
(4) ERROR: No Auth-Type found: rejecting the user via Post-Auth-Type = Reject
(4) Failed to authenticate the user
(4) Using Post-Auth-Type Reject
(4) # Executing group from file /usr/local/etc/raddb/sites-enabled/default
(4) Post-Auth-Type REJECT {
(4) attr_filter.access_reject: EXPAND %{User-Name}
(4) attr_filter.access_reject: --> bob
(4) attr_filter.access_reject: Matched entry DEFAULT at line 11
(4) [attr_filter.access_reject] = updated
(4) [eap] = noop
(4) policy remove_reply_message_if_eap {
(4) if (&reply:EAP-Message && &reply:Reply-Message) {
(4) if (&reply:EAP-Message && &reply:Reply-Message) -> FALSE
(4) else {
(4) [noop] = noop
(4) } # else = noop
(4) } # policy remove_reply_message_if_eap = noop
(4) } # Post-Auth-Type REJECT = updated
(4) Delaying response for 1.000000 seconds
Waking up in 0.3 seconds.
Waking up in 0.6 seconds.
(4) Sending delayed response
(4) Sent Access-Reject Id 204 from 127.0.0.1:1812 to 127.0.0.1:63640 length 20
Waking up in 3.9 seconds.
(4) Cleaning up request packet ID 204 with timestamp +746
Ready to process requests
我看到了警告
No "known good" password found for the user.
但是我不明白用这个命令提供密码的方法是什么,或者我应该把“用户”文件放在哪里,或者我应该把什么放在里面。无法理解如何使用此“radtest”或“radclient”工具连接到正在运行的服务器。欢迎任何帮助
echo "User-Name=bob,Cleartext-Password=hello" | /usr/local/bin/radclient localhost:1812 auth testing123
# or
echo "User-Name=bob,User-Password=hello" | /usr/local/bin/radclient localhost:1812 auth testing123
echo "User-Name=bob,Cleartext-Password=hello" | /usr/local/bin/radclient localhost:1812 auth testing123
Sent Access-Request Id 94 from 0.0.0.0:57710 to 127.0.0.1:1812 length 25
Received Access-Reject Id 94 from 127.0.0.1:1812 to 127.0.0.1:57710 length 20
(0) -: Expected Access-Accept got Access-Reject
radtest bob hello localhost 0 testing123
Sent Access-Request Id 89 from 0.0.0.0:61465 to 127.0.0.1:1812 length 73
User-Name = "bob"
User-Password = "hello"
NAS-IP-Address = 192.168.1.175
NAS-Port = 0
Message-Authenticator = 0x00
Cleartext-Password = "hello"
Received Access-Reject Id 89 from 127.0.0.1:1812 to 127.0.0.1:61465 length 20
(0) -: Expected Access-Accept got Access-Reject
(4) Received Access-Request Id 204 from 127.0.0.1:63640 to 127.0.0.1:1812 length 73
(4) User-Name = "bob"
(4) User-Password = "hello"
(4) NAS-IP-Address = 192.168.1.175
(4) NAS-Port = 0
(4) Message-Authenticator = 0x248b0163da0492fda522a592111071b8
(4) # Executing section authorize from file /usr/local/etc/raddb/sites-enabled/default
(4) authorize {
(4) policy filter_username {
(4) if (&User-Name) {
(4) if (&User-Name) -> TRUE
(4) if (&User-Name) {
(4) if (&User-Name =~ / /) {
(4) if (&User-Name =~ / /) -> FALSE
(4) if (&User-Name =~ /@[^@]*@/ ) {
(4) if (&User-Name =~ /@[^@]*@/ ) -> FALSE
(4) if (&User-Name =~ /\.\./ ) {
(4) if (&User-Name =~ /\.\./ ) -> FALSE
(4) if ((&User-Name =~ /@/) && (&User-Name !~ /@(.+)\.(.+)$/)) {
(4) if ((&User-Name =~ /@/) && (&User-Name !~ /@(.+)\.(.+)$/)) -> FALSE
(4) if (&User-Name =~ /\.$/) {
(4) if (&User-Name =~ /\.$/) -> FALSE
(4) if (&User-Name =~ /@\./) {
(4) if (&User-Name =~ /@\./) -> FALSE
(4) } # if (&User-Name) = notfound
(4) } # policy filter_username = notfound
(4) [preprocess] = ok
(4) [chap] = noop
(4) [mschap] = noop
(4) [digest] = noop
(4) suffix: Checking for suffix after "@"
(4) suffix: No '@' in User-Name = "bob", looking up realm NULL
(4) suffix: No such realm "NULL"
(4) [suffix] = noop
(4) eap: No EAP-Message, not doing EAP
(4) [eap] = noop
(4) [files] = noop
(4) [expiration] = noop
(4) [logintime] = noop
(4) pap: WARNING: No "known good" password found for the user. Not setting Auth-Type
(4) pap: WARNING: Authentication will fail unless a "known good" password is available
(4) [pap] = noop
(4) } # authorize = ok
(4) ERROR: No Auth-Type found: rejecting the user via Post-Auth-Type = Reject
(4) Failed to authenticate the user
(4) Using Post-Auth-Type Reject
(4) # Executing group from file /usr/local/etc/raddb/sites-enabled/default
(4) Post-Auth-Type REJECT {
(4) attr_filter.access_reject: EXPAND %{User-Name}
(4) attr_filter.access_reject: --> bob
(4) attr_filter.access_reject: Matched entry DEFAULT at line 11
(4) [attr_filter.access_reject] = updated
(4) [eap] = noop
(4) policy remove_reply_message_if_eap {
(4) if (&reply:EAP-Message && &reply:Reply-Message) {
(4) if (&reply:EAP-Message && &reply:Reply-Message) -> FALSE
(4) else {
(4) [noop] = noop
(4) } # else = noop
(4) } # policy remove_reply_message_if_eap = noop
(4) } # Post-Auth-Type REJECT = updated
(4) Delaying response for 1.000000 seconds
Waking up in 0.3 seconds.
Waking up in 0.6 seconds.
(4) Sending delayed response
(4) Sent Access-Reject Id 204 from 127.0.0.1:1812 to 127.0.0.1:63640 length 20
Waking up in 3.9 seconds.
(4) Cleaning up request packet ID 204 with timestamp +746
Ready to process requests
No "known good" password found for the user.