我正在一个项目中,我必须安装一次性密码authentication。 我已经成功地安装了可以在没有任何身份validation的情况下连接到的openVPN。 我已经安装了连接到我的LDAP服务器的OTP软件linOTP。
到LDAP服务器的连接正在运行,并且我已经为用户分配了一个令牌。 当使用debugging接口testing令牌时:// myip:5001 / validate / check它打印响应:
{ "version": "LinOTP 2.8.0.3", "jsonrpc": "2.0", "result": { "status": true, "value": true }, "id": 0 }
这意味着linOTPauthentication正在运行,但是当我在openVPN服务器上启用密码authentication时,authentication失败。
AUTH-PAM: BACKGROUND: user 'jdoe' failed to authenticate: Authentication failure
我已经根据这个指南做了所有的configuration: https : //www.howtoforge.com/how-to-set-up-openvpn-to-authenticate-with-linotp
这就是我的client.ovpn的样子:
client dev tun proto udp resolv-retry infinite nobind persist-key persist-tun ca ca.crt cert jdoe.crt key jdoe.key ns-cert-type server comp-lzo verb 3 auth-user-pass
为server.conf:
port 1194 proto udp dev tun ca ca.crt cert server.crt key server.key dh dh2048.pem server 10.8.0.0 255.255.255.0 ifconfig-pool-persist ipp.txt push "route 192.168.0.0 255.255.255.0" push "dhcp-option DNS 192.168.0.3" push "dhcp-option DNS myip" client-to-client keepalive 10 120 comp-lzo persist-key persist-tun status openvpn-status.log verb 3 plugin /usr/lib/openvpn/openvpn-auth-pam.so openvpn
和linotp文件,common-linotp:
auth [success=1 default=ignore] pam_python.so /lib/security/pam_linotp.py \ nosslhostnameverify nosslcertverify debug url=https://localhost/validate/check auth requisite pam_deny.so auth required pam_permit.so
我将使用自签名的HTTPS证书,因此我根据本指南的pam_py_linotp部分包含nosslhostnameverify和nosslcertverify: https ://www.linotp.org/howtos/howto-openvpn.html
最后是/etc/pam.d/openvpn文件:
@include common-linotp session sufficient pam_permit.so account sufficient pam_permit.so
我是新的服务器configuration,将不胜感激任何帮助。
服务器运行Ubuntu 12.04。
对于我来说,这个问题是通过添加hide_otp_input来解决的。 这是logging不好,但解决了同样的问题对我来说。
我正在使用pam_linotp.so模块,而不是可能有所作为的python实现。