OpenVPN complains about wrong user/password without you requesting one?

If your OpenVPN client is complaining about a wrong user/password combination (AUTH_FAILED), although you are not requesting it on your server, it might be a completely different reason.

After migrating to a new operating system but taking OpenVPN’s configuration with me, I was running into this problem. All clients were complaining about wrong username and password.

The reason is simple: line 3: mail: command not found
Wed May 25 23:16:22 2016 CertName/ WARNING: Failed running command (--client-connect): could not execute external program
Wed May 25 23:16:25 2016 CertName/ PUSH: Received control message: 'PUSH_REQUEST'
Wed May 25 23:16:25 2016 CertName/ Delayed exit in 5 seconds
Wed May 25 23:16:25 2016 CertName/ SENT CONTROL [CertName]: 'AUTH_FAILED' (status=1)

I configured OpenVPN to send an email on connect and disconnect of a client. The script wants to use the mail command – which is not installed as default by Xenial. This leads to a client-connect-script error which in turn leads OpenVPN to respond with an AUTH_FAILED. Which in turn gives the “Wrong username/password” error message on the clients.

Solution: Make the client-connect script working again 😀