Page 2 of 3
Re: Saving Username/Password
Posted: Tue Nov 04, 2014 2:56 pm
by thepodger
I have followed the "auth-user-pass password.txt" directions in Vista using V5 of the client and have yet to have any luck. Will update this post with the config settings soon. I suspect the OS is the issue. Will keep working on it a report findings here.
Re: Saving Username/Password
Posted: Wed Nov 05, 2014 1:37 am
by thepodger
Here is my config file. As you can see, I have used the "Path-to-config-dir\\password.txt" format, but it has not worked for me.
I run the VPN program with this edited and the log does not register anything at all. I am sure it is a simple layout issue.
Any advice would be very welcome. BTW, I am using this with pfsense, a very solid, feature-rich, Open Source firewall is you are looking for one. Being able to save the user and pass for this client would be nice.
URL for pfsense: https://www.pfsense.org/
====Start of File ========
dev tun
persist-tun
persist-key
cipher AES-128-CBC
auth SHA1
tls-client
client
resolv-retry infinite
remote 50.74.48.226 1196 tcp-client
lport 0
verify-x509-name "Redacted-UserName" name
auth-user-pass "C:\Program Files\OpenVPN\config\\login.conf"
pkcs12 bpbuster-TCP-1196-FredK.p12
tls-auth bpbuster-TCP-1196-FredK-tls.key 1
comp-lzo
passtos
Re: Saving Username/Password
Posted: Mon Nov 24, 2014 3:39 pm
by kpirlo
I didn't see this mentioned in here yet, but I was trying to get this to work also and the only thing that worked for me was using the old style path (progra~1):
auth-user-pass "C:\\Progra~1\\OpenVPN\\config\\pass.txt"
Hope this helps someone else.
Re: Saving Username/Password
Posted: Wed Dec 03, 2014 6:03 pm
by Sheepdisease
I am having the same problem as above and wonder if someone could please assist?
Re: Saving Username/Password
Posted: Wed Dec 31, 2014 8:38 am
by Globule
Check your client config file on your PC. You may have another entry auth-user-pass
Comment out the second one
Re: Saving Username/Password
Posted: Wed Dec 31, 2014 1:00 pm
by Traffic
thepodger wrote:auth-user-pass "C:\Program Files\OpenVPN\config\\login.conf"
Can you not see the error ?
Code: Select all
auth-user-pass "C:\Program Files\OpenVPN\config\\login.conf"
# Replace with:
auth-user-pass "C:\\Program Files\\OpenVPN\\config\\login.conf"
You can also use this in OpenVPN:
Code: Select all
auth-user-pass "C:/Program Files/OpenVPN/config/login.conf"
Re: Saving Username/Password
Posted: Tue Jan 06, 2015 11:33 am
by KWhite
openvpn@aetm.us wrote:I tried all these tips, with and without the full path, and then including the double "\\". That line in the .ovpn file now reads:
auth-user-pass "C:\\Program Files\\OpenVPN\\config\\login.conf"
OpenVPN still prompts me for a user and pass. Help!
Just create a new file using Notepad++
type in just 2 rows:
[username]
[pass]
your file should look like this:
John_Doe
mypassword
Go to Save As and select the config folder of your OpenVpn install (i.e. C:\Program Files\OpenVPN\config)
Save as "login.conf" . Select filetype "All Files".
Add to your .ovpn connection profile :
auth-user-pass login.conf
**Make sure this is the only line in the file like "auth-user-pass"
Save.
Connect.
This was the only way i could get it working on OpenVPN GUI v5-A.
Whenever i tried with a .txt pass file i would get " no such directory/ file...etc", even though the path was correct.
Re: Saving Username/Password
Posted: Wed Mar 04, 2015 7:38 am
by comeback1106
xauen wrote:1. Create a txt file on a folder alongside your .ovpn files name it what ever you want ex. 'pass.txt'
2. Put your user/pass inside the file in two(2) lines, like:
3. Then save it.
4. open up your .ovpn file in notepad and add:
5. save and connect to your openvpn server.
I have try this way and this work for me. But more question, Can I include the password to this ovpn file? Thanks.
Re: Saving Username/Password
Posted: Fri May 15, 2015 10:46 am
by mrdiegoa
Hi everybody.
Is there a means of storing just the login, without the password? The desired behavior would be that of the login/password dialog box appearing to the user already compiled in the login field.
Thanks,
Diego
Re: Saving Username/Password
Posted: Fri Oct 16, 2015 8:43 am
by oshliaer
Hi! Just an additional.
"auth-user-pass" is enough for the normal job.
If you are using Windows you should to save the login/pass file to
ASCII.
Not UTF-8 or other.
It means using the notepad with default settings is a good idea.
Cheers!
Re: Saving Username/Password
Posted: Thu Oct 29, 2015 7:25 am
by freedomClub
On windows the password file (eg. "login.conf") needs to be in:
1. DOS file format
2. Not UTF-8
Re: Saving Username/Password
Posted: Thu Oct 29, 2015 7:28 am
by freedomClub
In windows the passwords file (eg. login.conf) needs to be:
1. DOS file format
2. Not UTF-8
Re: Saving Username/Password
Posted: Tue Feb 16, 2016 6:52 pm
by thelimey
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.
Re: Saving Username/Password
Posted: Fri Dec 09, 2016 10:43 pm
by joutcast
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
Re: Saving Username/Password
Posted: Fri Dec 09, 2016 11:27 pm
by joutcast
Sorry it is "auth-user-pass" lol
Re: Saving Username/Password
Posted: Fri Dec 09, 2016 11:30 pm
by disqualified
joutcast wrote:auth-us(e)r-pass "./login.conf"
Do
not name your file
login.conf
Re: Saving Username/Password
Posted: Wed Jul 26, 2017 12:07 am
by minions
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!
Re: Saving Username/Password
Posted: Thu Oct 26, 2017 1:25 am
by msoldier55
This solution works. However, what if the VPN requires a group. I am using a Windows environment.
When I use Cisco AnyConnect, I specify a group, username and password. What is the equivalent in the config file?
Thanks.
Max
Re: Saving Username/Password
Posted: Thu Oct 26, 2017 10:20 am
by TinCanTech
msoldier55 wrote: ↑Thu Oct 26, 2017 1:25 am
what if the VPN requires a group
Openvpn only supports username and password.
Re: Saving Username/Password
Posted: Sun Sep 27, 2020 6:43 am
by Sumku
joutcast wrote: ↑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
You know, I had searched at so many places and tried so many different things that when your suggestion finally worked, I just could not resist the urge to create Profile just so that I can say "Thank You". Solved for Me. Greatly Appreciated.