How to use OpenVPN without login and password

It can be cumbersome to type in the login and password every time you connect using OpenVPN. It has a feature named auth-user-pass where you can provide the login and password in a file.

  • Put your login and password in a file, one on each line.
  • If you are using a OpenVPN config file to connect, indicate the above file in it:
auth-user-pass /path/to/file
  • You can also provide this at the command by passing it to the --auth-user-pass option.

Tried with: OpenVPN 2.3.7 and Ubuntu 15.10

OpenVPN: Route Add Failure on Windows Vista


OpenVPN (and OpenVPN GUI) on Windows Vista fails silently if executed without Administrator privileges. The error is almost not noticeable since VPN succeeds in obtaining an IP address (see the green OpenVPN icon in the screenshot). But, the VPN is not established due to the error:

ERROR: Windows route add command failed: system() returned error code 1
The requested operation requires elevation.


Run OpenVPN as Administrator or if this is a frequent used application change its shortcut to always run as Administrator.