If you are using OpenVPN in a Linux platform through command line, it is always handy to be able to save the authentication information in a file and let openvpn use them. There are two ways you can do it.
First save the password in a file e.g auth.txt with two lines:
First line is for username and the second line is for password.
If you are using .ovpn files for configuration, open the .ovpn file and simply add the following:
Now, your authentication would use the authentication given in that file
You may add the
auth-user-pass in the openvpn command line argument, but you have to make sure, this is passed after the
--config. Here is an example
openvpn --config "your_file.ovpn" --auth-user-pass "auth.txt"
That should be enough.