For experienced VPN users using OpenVPN is a breeze, for those who are less technically minded just the action of installing and getting OpenVPN to work and then the addition of adding configuration files can seem like an achievement in itself.
One of the most annoying factors for most users is the requirement to continually need to input your username and password every time you want to connect to a server. The requirement in itself is problematic and introduces two issues.
We can't remember passwords!
As humans we have an inability to remember long combinations of random letters, numbers and symbols. We're regularly told to keep passwords unique to every site that we visit and every service that we use, we're also told not to use common words, names or details which are specific to ourselves.
Something like, “[email protected]&” would be ideal, even better would be “[email protected][email protected]&” but unfortunately unless you're blessed with a unique talent, being able to easily remember such combinations is something the rest of us would find an impossible task.
As your internet usage grows the amount of services or websites that you sign up to increases, we may need to remember 5 random passwords, months later that could be 10… or 20… or 100! As I said, an impossible task. So the most obvious solution for many people is to use simple passwords such as, “password” or “123456” and if you don't believe me the most common password in 2013 was “password” followed closely by “123456”. Requiring a password to be entered regularly leads to users choosing ones that are easy to remember making the choice insecure.
Better things to do than keep entering passwords
The second issue is it is rather tedious. Many users like to log in and out of their VPN for specific reasons. Users may log into do a bit of torrenting via the VPN, but then disconnect when logging in to their bank. Watching a bit of Sherlock if you're outside the UK requires you to connect to your VPN, but if you need to make a quick Paypal transaction you might want to disconnect and so on.
Entering your username and password over and over can get repetitive and it is a requirement that most of us would gladly remove if possible. The great news is, it is possible to save both your username and password in your OpenVPN configuration and by following my simple steps you will never have to enter them again.
I must point out that saving passwords in plain text which is what is required goes against what is considered best practise for computer use, however if you're one of the millions of users who use a simple password then this must be far superior in terms of security than your current password usage, the second reassurance is if you're moving towards better practise for password use then your VPN password should be unique so in the extremely unlikely case that you ended up with a trojan on your system which in turn opened up a back door and let some nefarious type into your system, the only access they would gain would be to connect to your VPN.
In theory that would have been possible already even if you didn't follow this process as it would have been possible for a criminal to install a key logger and log you typing it in each time. So in that regard it probably isn't any less secure. So while this process wouldn't be considered totally secure in computing terms, it will only really be bettered by you remembering your 25 character password in your head.
Step by step process
- Navigate to your OpenVPN installation folder, usually either C:\Program Files (x86)\OpenVPN\ or C:\Program Files\OpenVPN\
- In the Config folder create a new text file of any name you wish in Notepad or Wordpad.
- On the first line enter your username and on the second your password. (see image)
- Save this text file.
- Open the .ovpn config file that you want to save your password in with either Notepad or Wordpad.
- Add a new line to the bottom of the file and write : auth-user-pass password.txt (password.txt should be the name of your text file from Step 2)
- Save the file.
That is it! Next time you load up OpenVPN and connect to the profile of your choice you'll no longer have to enter either your username or password.
If you have multiple servers that make use of the same username and password then you can paste in auth-user-pass password.txt on those config files too. Have a different profile that requires a different username and password? Just create a new text file with a different name and add the line in from Step 5.
Brain image courtesy of ddpavumba / FreeDigitalPhotos.net