freeradius 使用者設定檔中 SMD5 密碼的預期值是多少?

freeradius 使用者設定檔中 SMD5 密碼的預期值是多少?

我在 Ubuntu v14.04 上使用 freeradius v2.1.12。這是/etc/freeradius/users:

test    SMD5-Password := "{SMD5}xbYqJDY4gqVyE8Vhty//QnRlc3RpbmcxMjM="

我透過使用 perl 腳本來獲得這個值http://www.openldap.org/faq/data/cache/418.html,我更改了該腳本,將“secret”替換為“test”,將“salt”替換為“testing123”,因為“test”是我的密碼,“testing123”是共用秘密。

這是/etc/freeradius/clients.conf:

client test {
        ipaddr = 127.0.0.1
        secret = testing123
}

我還更改了 /etc/freeradius/modules/pap 將“auto_header”設定為“yes”:

pap {
        auto_header = yes
}

我在同一台機器上使用 radtest:

radtest -x -t pap test test localhost 0 testing123

Radius伺服器密碼匹配失敗:

#> freeradius -X
......
[pap] login attempt with password "test"
[pap] Using SMD5 encryption.
[pap] Passwords don't match
++[pap] returns reject

你看出什麼問題了嗎?

謝謝!

[更新] 謝謝Wumpus-Q-Wumbley, 這就對了​​。刪除“[SMD5]”即可工作。

答案1

您已將 rlm_pap 配置為搜尋標頭,但將雜湊值放在不檢查標頭的屬性中。

您應該將您的 SMD5 密碼放入Password-With-Header屬性中,rlm_pap 然後將剝離標頭並將密碼放入正確的屬性中。

test    Password-With-Header := "{SMD5}xbYqJDY4gqVyE8Vhty//QnRlc3RpbmcxMjM="

或者,您可以執行您所做的操作並刪除{SMD5}前綴。

相關內容