Saving Username/Password

How to customize and extend your OpenVPN installation.
freedomClub
OpenVpn Newbie
Posts: 2
Joined: Thu Oct 29, 2015 7:22 am

Re: Saving Username/Password

Post by freedomClub » Thu Oct 29, 2015 7:25 am

On windows the password file (eg. "login.conf") needs to be in:
1. DOS file format
2. Not UTF-8

freedomClub
OpenVpn Newbie
Posts: 2
Joined: Thu Oct 29, 2015 7:22 am

Re: Saving Username/Password

Post by freedomClub » Thu Oct 29, 2015 7:28 am

In windows the passwords file (eg. login.conf) needs to be:
1. DOS file format
2. Not UTF-8

thelimey
OpenVpn Newbie
Posts: 1
Joined: Thu Aug 08, 2013 3:13 pm

Re: Saving Username/Password

Post by thelimey » Tue Feb 16, 2016 6:52 pm

LOL. I had this issue, and eventually worked out it was because I was an idiot....

I forgot that:
1) Windows hides file extensions
2) notepad adds .txt to the file name

So OpenVPN was correct that the file login.conf didn't exist because it was actually named login.conf.txt

I tried with Notepad++ after others said that was the way they got it to work. It saves the file with the name you specify, without adding an extra .txt, that was when I realised what had happened.

joutcast
OpenVpn Newbie
Posts: 2
Joined: Fri Dec 09, 2016 10:32 pm

Re: Saving Username/Password

Post by joutcast » Fri Dec 09, 2016 10:43 pm

Not attempting to be captain obvious here, and please correct me if this is not getting over looked. However, I have not seen anyone specifying to insert the file name at the header of the file.... the only way it works for me is outlined below. This example assumes login.conf is the credentialing file and in the same directory.

In YourConnection.ovpn on auth-usr-pass line:

auth-usr-pass "./login.conf"

In your login.conf file:

login.conf
YourUserName
YourPassword

joutcast
OpenVpn Newbie
Posts: 2
Joined: Fri Dec 09, 2016 10:32 pm

Re: Saving Username/Password

Post by joutcast » Fri Dec 09, 2016 11:27 pm

Sorry it is "auth-user-pass" lol

User avatar
disqualified
OpenVPN User
Posts: 35
Joined: Fri Jun 03, 2016 7:13 pm

Re: Saving Username/Password

Post by disqualified » Fri Dec 09, 2016 11:30 pm

joutcast wrote:auth-us(e)r-pass "./login.conf"
Do not name your file login.conf :roll:

minions
OpenVpn Newbie
Posts: 4
Joined: Wed Jul 26, 2017 12:03 am

Re: Saving Username/Password

Post by minions » Wed Jul 26, 2017 12:07 am

I found the answer!

I know this is pretty dang old but I figure there are some out there like me who came across this while trying to find the answer.

I also found this: https://community.openvpn.net/openvpn/ticket/697

Which gave me the answer. If you notice, it is a ticket and the answer is given by OpenVPN staff themselves, so that should instill confidence. In any case, it worked for me while no other post listed in this thread worked.

What you need to do is add this to your *.ovpn file:

Code: Select all

askpass "C:/Program Files/OpenVPN/config/[filename].conf"
Then create that .conf file with ONLY your password.

It should work! Sorry if it doesn't! I'm just passing on what worked for me and what I believe works.

Good luck!

Post Reply