How can I avoid having to enter my VPN username and password whenever connecting to my VPN with OpenVPN?

First, you must have installed the latest version of TUVPN OpenVPN client for Windows to utilise the option of saving username and password for OpenVPN. This process cannot be applied for users of Mac or Linux systems.

Once you have ensured that you have the latest OpenVPN client, open Notepad by running it as Administrator. You do this by right-clicking over notepad and clicking 'Run as administrator'. Then type in your VPN username and password in two separate lines (no line space between them!) :

 Then save the new text file in the Config subfolder of the OpenVPN program folder (by default, C: \ Program Files \ OpenVPN \ config). Use the file name 'pass.txt'.

 Finally we have to tell OpenVPN to read our username and password from this 'txt' file. To do this, edit the OpenVPN configuration in the same way we switch vpn node (see Tutorials) and add 'pass.txt' to the line 'auth_user_pass'. Just one space between this text and the newly added 'pass.txt'.

 

 Close the OpenVPN config notepad window and save you changes. You will no longer be asked for your username and password when connecting to your vpn!

 NB: Any person accessing your machine as a user with Administrator privileges can read this file and find your VPN username and password. We hope that you understand the risks involved and whether or not this is acceptable to you.

< Back to FAQs