我在我的服务器上运行 freeradius 3.*,MultiOTP 版本为 4.3.1.1,为了配置 FreeRADIUS,我使用了本指南:
http://wiki.freeradius.org/guide/multiOTP-HOWTO
当我使用 radiusd 时,-X
错误就是这样的
我的policy.conf
root@debian:~# cat /usr/local/etc/raddb/policy.d/policy.conf
policy {
# Change to a specific prefix if you want to deal with normal PAP authentication as well as OTP
# e.g. "multiotp_prefix = 'otp:'"
multiotp_prefix = ''
multiotp.authorize {
# This test is for decimal OTP code only, otherwise you will have to change it
# Try for example this simple test: if (!control:Auth-Type) {
if (control:Auth-Type == 'MS-CHAP') {
update control {
Auth-Type := multiotpmschap
}
}
elsif (!control:Auth-Type && User-Password =~ /^${policy.multiotp_prefix}([0-9]{10})$/) {
update control {
Auth-Type := multiotp
}
}
}
}
我找到了更多任何文档和维基,但它不起作用。所以我想知道它出了什么问题。
答案1
改变
if (control:Auth-Type == 'MS-CHAP') {
到
if (control:Auth-Type == MS-CHAP) {