Ubuntu – How to install PAM for OpenVPN server

authenticationnetworkingopenvpnservervpn

I followed a guide on installing an OpenVPN server on Ubuntu successfully, and all is well with authenticating and connecting, etc. However, now I want to implement username/password authentication (as opposed to just certificate authentication). Every article that I'm reading about talks about using PAM, and reference that it's already installed and the plugin can be found in places like /usr/share/openvpn/plugin/lib/openvpn-auth-pam.so

However, that file doesn't exist for me. In fact, the only thing that exists in /usr/share/openvpn is a file named verify-cn. If I check /etc/openvpn/, nothing exciting is in there:

[root@vpn:/etc/openvpn]# ls /etc/openvpn
ca.crt  client  dh2048.pem  server  server.conf  server.crt  server.key  ta.key  update-resolv-conf

Can someone help me out with what I'm missing here? I can't even find any references to install PAM so that I can actually use the plugin. Do I need to download the source code for OpenVPN or something? I just simply installed it, per the guide's instruction, using apt install openvpn (https://www.digitalocean.com/community/tutorials/how-to-set-up-an-openvpn-server-on-ubuntu-16-04)

Any suggestions would be greatly appreciated.

Best Answer

As steeldriver's comment says, you can check the package listing to find the file. This can also be done using the Package Index (https://packages.ubuntu.com). For example:

  • 16.04 (xenial) has the file at /usr/lib/openvpn/openvpn-plugin-auth-pam.so, but
  • 18.04 (bionic) has the file at /usr/lib/x86_64-linux-gnu/openvpn/plugins/openvpn-plugin-auth-pam.so (for amd64/x86-64).
Related Question