Hi,
i just seached into forum and over google but i found no solution.
In my config file i have auth-user-pass parameter and client prompt me for user and password.
I would like to save ONLY the username and promped for password each time i connect.
It's is possible? I', running openvpn2.2.2 on windows 7 32 bit.
Thanks
Re: Save username only and prompt for password
Posted: Tue Dec 04, 2012 4:19 pm
by marcolino7
Up.............
Re: Save username only and prompt for password
Posted: Tue Apr 16, 2013 7:53 pm
by CourtK
Bump. I am interested in this too. Is there a way to do this?
Re: Save username only and prompt for password
Posted: Wed Apr 17, 2013 8:19 am
by janjust
currently there is no way to do this in openvpn 2.2 or 2.3; the patch is fairly trivial, I guess, but nobody has bothered to write it thus far.
Re: Save username only and prompt for password
Posted: Tue Sep 22, 2015 12:58 pm
by stefan2k1
Hi,
is there any news here? I would like to save only the username and not the password. Has this function been implemented now?
Thanks
Stefan
Re: Save username only and prompt for password
Posted: Tue Jan 19, 2016 9:18 pm
by dishcandanty
Pretty sure for the linux client (openvpn file.opvn). You can put this in the file:
Re the last poster, does that definitely work with the Linux client? It doesn't work with the Windows client.
If you just have the single line, it'll come back right away with an error ("Connecting to [username] has failed."). If you create a newline after it, it does the same. Perhaps there's some other nuance to this.
The manual seems to agree with you though. Could it be in reference to Linux only?
--auth-user-pass [up]
Authenticate with server using username/password. up is a file containing username/password on 2 lines. If the password line is missing, OpenVPN will prompt for one.
Re: Save username only and prompt for password
Posted: Sun Aug 21, 2016 2:52 pm
by TinCanTech
At this time under windows, using username only in the file does not work.
>We could easily make querying from management get higher priority over
>reading from file/console, but, given that the latest GUI remembers
>username, there may not be a strong need for such a feature.
Has anyone seen it do that on Windows?
Re: Save username only and prompt for password
Posted: Mon Aug 22, 2016 3:29 pm
by TinCanTech
If you mean:
rseiler wrote:given that the latest GUI remembers
>username
You need the latest development snapshot not the 2.3.11 release.
I haven't been following how those pre-releases work, but the latest one there seems to still be a 2.3.11 (but a later version of it). Today, 2.3.12 was released publicly, so if version numbers mean anything, then I would think it would have it. I haven't been able to test yet.
Re: Save username only and prompt for password
Posted: Wed Nov 02, 2016 1:08 pm
by szeestraten
Is the Windows client for 2.3.12 supposed to be able to remember only the username?
If so, how?
Re: Save username only and prompt for password
Posted: Tue Nov 29, 2016 2:06 am
by rseiler
I don't know. Even the 2.3.13 client doesn't do it here. Username is never remembered.
Re: Save username only and prompt for password
Posted: Tue Nov 29, 2016 7:41 am
by TiTex
the beta 2.4 does , and i didn't have any issues with it regarding to connect to remote servers.
Re: Save username only and prompt for password
Posted: Fri Dec 02, 2016 9:25 pm
by rseiler
What's the trick? I just tried it with the newly-posted 2.4 RC1, which I see in the release notes has "Support for username-only auth file," but when I removed the PW from my file and tried making a connection, I got the usual immediate "Connection has failed" (same as what I get with 2.3). The log reads "Failed retrieving username or password."
Somewhere a while back I read that the end of the auth file needs to have a blank line, but that didn't work either.
Re: Save username only and prompt for password
Posted: Sat Dec 17, 2016 7:12 pm
by rseiler
RC2 is out now. No change.
@TiTex, still waiting on you to clear up specifically how it's done.
Re: Save username only and prompt for password
Posted: Sat Dec 17, 2016 9:34 pm
by TinCanTech
rseiler wrote:RC2 is out now. No change
It works as expected ..
--auth-user-pass useronly.txt
useronly.txt
username
Re: Save username only and prompt for password
Posted: Sat Dec 17, 2016 9:46 pm
by rseiler
There's some other variable, because that's how I've been trying it. It quickly comes back with the error I mentioned a couple message ago.
Re: Save username only and prompt for password
Posted: Sat Dec 17, 2016 11:23 pm
by TinCanTech
rseiler wrote:There's some other variable, because that's how I've been trying it
There is some other variable because it works fine if done correctly.
rseiler wrote:It quickly comes back with the error I mentioned a couple message ago.
rseiler wrote:I got the usual immediate "Connection has failed" (same as what I get with 2.3). The log reads "Failed retrieving username or password."