Saving Username/Password
Moderators: TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech
-
- 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: 11137
- 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
-
- OpenVpn Newbie
- Posts: 1
- Joined: Thu Jan 07, 2021 8:55 pm
Re: Saving Username/Password
auth-usr-pass "./login.conf"
This did not help in connecting OpenVpn Connect 2.6.0.100 on a Windows 10 machine.
auth-user-pass "C:\\Users\\ab\\Downloads\\login.conf"
Any suggestions on how to fix it?
This did not help in connecting OpenVpn Connect 2.6.0.100 on a Windows 10 machine.
auth-user-pass "C:\\Users\\ab\\Downloads\\login.conf"
Any suggestions on how to fix it?
-
- OpenVpn Newbie
- Posts: 3
- Joined: Thu Aug 27, 2020 4:02 am
Re: Saving Username/Password
I'm trying to figure this out now, June 27th 2022. I'm not having good luck.
On mine, the .exe is called OpenVPNConnect.exe and there is no config directory next to it. The exact path is "C:\Program Files\OpenVPN Connect"
is Connect something else, a completely different program?
On mine, the .exe is called OpenVPNConnect.exe and there is no config directory next to it. The exact path is "C:\Program Files\OpenVPN Connect"
is Connect something else, a completely different program?
-
- OpenVPN Protagonist
- Posts: 11137
- Joined: Fri Jun 03, 2016 1:17 pm
-
- OpenVpn Newbie
- Posts: 3
- Joined: Thu Aug 27, 2020 4:02 am
Re: Saving Username/Password
Please, tell me what I must do then. Is there a special client I have to download? I just want a vpn to my isp that saves my username/pw. I have a ovpn file from my ISP.
-
- OpenVpn Newbie
- Posts: 2
- Joined: Thu Jun 18, 2020 9:55 am
Re: Saving Username/Password
Hi,
Is it possible to save user &pwd combination directly in the distributed .OVPN file? For example , my Keenetic router supports this tag in passed .OVPN files:
<auth-user-pass>
user
pwd
</auth-user-pass>
The target OpenVPN client is OpenVPN Connect 2.7.1.111, OS - Windows 10 x64 21H2
Is it possible to save user &pwd combination directly in the distributed .OVPN file? For example , my Keenetic router supports this tag in passed .OVPN files:
<auth-user-pass>
user
pwd
</auth-user-pass>
The target OpenVPN client is OpenVPN Connect 2.7.1.111, OS - Windows 10 x64 21H2
-
- OpenVpn Newbie
- Posts: 1
- Joined: Tue Apr 18, 2023 11:42 am
Re: Saving Username/Password
I got the same issue as I added a new line for auth-user-pass at the end of the .ovpn file. But there was a pre-existing auth-user-pass without any filename higher up in the .ovpn file, which cause the issue. Try add your password file with the full path to the pre-existing auth-user-pass line and leave it with that.Kyrax wrote: ↑Fri Nov 15, 2013 9:20 amGood morning,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
i tried this but the password continue to be asked. it look like the second line isn't read. (the file pass.txt was created with notepad++)
No error messages appear in logs.
Version 2.3.2
OS: Win 7 64 bits
Thanks for your help
-
- OpenVpn Newbie
- Posts: 8
- Joined: Fri Jun 09, 2023 12:27 pm
Re: Saving Username/Password
Yep.
askpass tunnel.pass
and no login in tunnel.pass
only password.
thanks!
askpass tunnel.pass
and no login in tunnel.pass
only password.
thanks!