kiwivpnusr
Hi,
I just installed sucessfully a OpenVPN server on Ubuntu Server 14.04 LTS
Everything is working perfectly except for the username/password authentication with the pam plugin.
I currently only authenticate with the certificates and keys on the clients (ca.crt, ta.key, client.crt and client.key) but I would like to add the server's username and password into the authentication process as well to get a real two factor authentication process.
This is 2 things that I already tried and did not work:
1-cp /usr/lib/openvpn/openvpn-plugin-auth-pam.so /etc/openvpn/
add this line to my /etc/openvpn/server.conf file:
plugin /usr/share/openvpn/plugin/lib/openvpn-auth-pam.so login
(as suggested on the official openvpn doc)
2-follow these steps that I found on a blog:
For Ubuntu 14.04
cp /usr/lib/openvpn/openvpn-plugin-auth-pam.so /etc/openvpn/
Now edit the /etc/openvpn/server.conf file and add the following:
username-as-common-name
tmp-dir "/etc/openvpn/tmp/"
plugin /etc/openvpn/openvpn-plugin-auth-pam.so /etc/pam.d/login
Create the temp directory mentioned above and allow all writes to it:
mkdir /etc/openvpn/tmp
chmod 777 /etc/openvpn/tmp
Restart OpenVPN
/etc/init.d/openvpn restart
I only want the pam plugin to authenticate with the local server's users in etc/passwd or /etc/shadow
What is the official way to do that safely?
Thank you! 🙂