Saving Username/Password
Moderators: TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech
-
- OpenVpn Newbie
- Posts: 2
- Joined: Tue Nov 04, 2014 2:49 pm
Re: Saving Username/Password
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.
-
- OpenVpn Newbie
- Posts: 2
- Joined: Tue Nov 04, 2014 2:49 pm
Re: Saving Username/Password
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
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
-
- OpenVpn Newbie
- Posts: 1
- Joined: Mon Nov 24, 2014 3:36 pm
Re: Saving Username/Password
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.
auth-user-pass "C:\\Progra~1\\OpenVPN\\config\\pass.txt"
Hope this helps someone else.
-
- OpenVpn Newbie
- Posts: 2
- Joined: Tue Dec 02, 2014 9:34 pm
Re: Saving Username/Password
I am having the same problem as above and wonder if someone could please assist?
-
- OpenVpn Newbie
- Posts: 1
- Joined: Wed Dec 31, 2014 8:38 am
Re: Saving Username/Password
Check your client config file on your PC. You may have another entry auth-user-pass
Comment out the second one
Comment out the second one
- Traffic
- OpenVPN Protagonist
- Posts: 4066
- Joined: Sat Aug 09, 2014 11:24 am
Re: Saving Username/Password
Can you not see the error ?thepodger wrote:auth-user-pass "C:\Program Files\OpenVPN\config\\login.conf"
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"
Code: Select all
auth-user-pass "C:/Program Files/OpenVPN/config/login.conf"
-
- OpenVpn Newbie
- Posts: 1
- Joined: Tue Jan 06, 2015 11:23 am
Re: Saving Username/Password
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.
-
- OpenVpn Newbie
- Posts: 3
- Joined: Wed Mar 04, 2015 7:17 am
Re: Saving Username/Password
I have try this way and this work for me. But more question, Can I include the password to this ovpn file? Thanks.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.Code: Select all
username password
4. open up your .ovpn file in notepad and add:
5. save and connect to your openvpn server.Code: Select all
auth-user-pass pass.txt
-
- OpenVpn Newbie
- Posts: 1
- Joined: Fri May 15, 2015 10:42 am
Re: Saving Username/Password
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
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
-
- OpenVpn Newbie
- Posts: 1
- Joined: Fri Oct 16, 2015 8:35 am
Re: Saving Username/Password
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!
"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!
-
- OpenVpn Newbie
- Posts: 2
- Joined: Thu Oct 29, 2015 7:22 am
Re: Saving Username/Password
On windows the password file (eg. "login.conf") needs to be in:
1. DOS file format
2. Not UTF-8
1. DOS file format
2. Not UTF-8
-
- OpenVpn Newbie
- Posts: 2
- Joined: Thu Oct 29, 2015 7:22 am
Re: Saving Username/Password
In windows the passwords file (eg. login.conf) needs to be:
1. DOS file format
2. Not UTF-8
1. DOS file format
2. Not UTF-8
-
- OpenVpn Newbie
- Posts: 1
- Joined: Thu Aug 08, 2013 3:13 pm
Re: Saving Username/Password
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.
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.
-
- OpenVpn Newbie
- Posts: 2
- Joined: Fri Dec 09, 2016 10:32 pm
Re: Saving Username/Password
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
In YourConnection.ovpn on auth-usr-pass line:
auth-usr-pass "./login.conf"
In your login.conf file:
login.conf
YourUserName
YourPassword
-
- OpenVpn Newbie
- Posts: 2
- Joined: Fri Dec 09, 2016 10:32 pm
Re: Saving Username/Password
Sorry it is "auth-user-pass" lol
- disqualified
- OpenVPN User
- Posts: 40
- Joined: Fri Jun 03, 2016 7:13 pm
Re: Saving Username/Password
Do not name your file login.confjoutcast wrote:auth-us(e)r-pass "./login.conf"
-
- OpenVpn Newbie
- Posts: 4
- Joined: Wed Jul 26, 2017 12:03 am
Re: Saving Username/Password
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:
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!
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"
It should work! Sorry if it doesn't! I'm just passing on what worked for me and what I believe works.
Good luck!
-
- OpenVpn Newbie
- Posts: 1
- Joined: Thu Oct 26, 2017 1:24 am
Re: Saving Username/Password
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
When I use Cisco AnyConnect, I specify a group, username and password. What is the equivalent in the config file?
Thanks.
Max
-
- OpenVPN Protagonist
- Posts: 11138
- Joined: Fri Jun 03, 2016 1:17 pm
Re: Saving Username/Password
Openvpn only supports username and password.
-
- OpenVpn Newbie
- Posts: 1
- Joined: Sun Sep 27, 2020 6:41 am
Re: Saving Username/Password
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.joutcast wrote: ↑Fri Dec 09, 2016 10:43 pmNot 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