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.

  • 1
    Does dpkg -L openvpn | grep '\bpam\b' shed any light? – steeldriver May 17 '18 at 23:42
  • Thanks. It actually did. Not sure why nothing references this path. I guess I must have mistyped my find command too. I really appreciate your help. – nothing May 17 '18 at 23:44
  • Where was it? I've ran it on Ubuntu 18.10 and couldn't find a thing although openvpn is installed – Yehonatan Tsirolnik Dec 19 '18 at 14:32

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).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.