Save username only and prompt for password

How to customize and extend your OpenVPN installation.
marcolino7
OpenVpn Newbie
Posts: 2
Joined: Wed Nov 28, 2012 11:01 pm

Save username only and prompt for password

Postby marcolino7 » Wed Nov 28, 2012 11:04 pm

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

marcolino7
OpenVpn Newbie
Posts: 2
Joined: Wed Nov 28, 2012 11:01 pm

Re: Save username only and prompt for password

Postby marcolino7 » Tue Dec 04, 2012 4:19 pm

Up.............

CourtK
OpenVpn Newbie
Posts: 4
Joined: Wed Feb 13, 2013 10:51 pm

Re: Save username only and prompt for password

Postby CourtK » Tue Apr 16, 2013 7:53 pm

Bump. I am interested in this too. Is there a way to do this?

User avatar
janjust
Forum Team
Posts: 2702
Joined: Fri Aug 20, 2010 2:57 pm
Location: Amsterdam
Contact:

Re: Save username only and prompt for password

Postby janjust » Wed Apr 17, 2013 8:19 am

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.

stefan2k1
OpenVpn Newbie
Posts: 1
Joined: Tue Sep 22, 2015 12:57 pm

Re: Save username only and prompt for password

Postby stefan2k1 » Tue Sep 22, 2015 12:58 pm

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

dishcandanty
OpenVpn Newbie
Posts: 1
Joined: Tue Jan 19, 2016 9:15 pm

Re: Save username only and prompt for password

Postby dishcandanty » Tue Jan 19, 2016 9:18 pm

Pretty sure for the linux client (openvpn file.opvn). You can put this in the file:

Code: Select all

auth-user-pass file.txt

And said file has just a single line (you may want relative paths):

Code: Select all

name

And it will prompt for just the password.

rseiler
OpenVPN User
Posts: 32
Joined: Sat Feb 09, 2013 9:10 pm

Re: Save username only and prompt for password

Postby rseiler » Sun Aug 21, 2016 1:53 am

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.

User avatar
TinCanTech
OpenVPN Protagonist
Posts: 2428
Joined: Fri Jun 03, 2016 1:17 pm

Re: Save username only and prompt for password

Postby TinCanTech » Sun Aug 21, 2016 2:52 pm

At this time under windows, using username only in the file does not work.

User avatar
TinCanTech
OpenVPN Protagonist
Posts: 2428
Joined: Fri Jun 03, 2016 1:17 pm

Re: Save username only and prompt for password

Postby TinCanTech » Mon Aug 22, 2016 12:09 pm

A more detailed explanation can be found here:
https://sourceforge.net/p/openvpn/mailman/message/35293066/

rseiler
OpenVPN User
Posts: 32
Joined: Sat Feb 09, 2013 9:10 pm

Re: Save username only and prompt for password

Postby rseiler » Mon Aug 22, 2016 3:11 pm

>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?

User avatar
TinCanTech
OpenVPN Protagonist
Posts: 2428
Joined: Fri Jun 03, 2016 1:17 pm

Re: Save username only and prompt for password

Postby TinCanTech » Mon Aug 22, 2016 3:29 pm

If you mean:
rseiler wrote:given that the latest GUI remembers
>username
You need the latest development snapshot not the 2.3.11 release.

See here:
http://build.openvpn.net/downloads/snapshots/

rseiler
OpenVPN User
Posts: 32
Joined: Sat Feb 09, 2013 9:10 pm

Re: Save username only and prompt for password

Postby rseiler » Wed Aug 24, 2016 7:57 pm

TinCanTech wrote:If you mean:
rseiler wrote:given that the latest GUI remembers
>username
You need the latest development snapshot not the 2.3.11 release.

See here:
http://build.openvpn.net/downloads/snapshots/

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.

szeestraten
OpenVpn Newbie
Posts: 1
Joined: Wed Nov 02, 2016 1:04 pm

Re: Save username only and prompt for password

Postby szeestraten » Wed Nov 02, 2016 1:08 pm

Is the Windows client for 2.3.12 supposed to be able to remember only the username?
If so, how?

rseiler
OpenVPN User
Posts: 32
Joined: Sat Feb 09, 2013 9:10 pm

Re: Save username only and prompt for password

Postby rseiler » Tue Nov 29, 2016 2:06 am

I don't know. Even the 2.3.13 client doesn't do it here. Username is never remembered.

TiTex
OpenVPN Expert
Posts: 206
Joined: Tue Apr 12, 2011 6:22 am

Re: Save username only and prompt for password

Postby TiTex » Tue Nov 29, 2016 7:41 am

the beta 2.4 does , and i didn't have any issues with it regarding to connect to remote servers.


Return to “Scripting and Customizations”

Who is online

Users browsing this forum: No registered users and 3 guests