How to Avoid Username & Password at each time of Connecting?

How to customize and extend your OpenVPN installation.
Post Reply
mani313
OpenVpn Newbie
Posts: 5
Joined: Sun Jan 01, 2012 7:08 am

How to Avoid Username & Password at each time of Connecting?

Post by mani313 » Fri Feb 24, 2012 4:37 am

Sir,

Please anyone tell me how to avoid username and password at each time trying to connecting to a server?

I have save username and password in the file 'pass.auth' and edited the config file as
script-security 2
auth-user-pass pass.auth
but the openVPN shows error as
Fri Feb 24 09:50:59 2012 OpenVPN 2.1.4 i686-pc-mingw32 [SSL] [LZO2] [PKCS11] built on Nov 8 2010
Fri Feb 24 09:50:59 2012 Sorry, 'Auth' password cannot be read from a file
Fri Feb 24 09:50:59 2012 Exiting
in 'Portable OpenVPN i can done it, but installed OPenVPN shows error.......

This is my Client Config :
# TsunamiVPN Client Config

tls-client
client
dev tun
proto tcp
remote-random
remote 173.231.57.174 443
ca tsunami.crt
route-method exe
route-delay 2
resolv-retry infinite
nobind
float
persist-key
persist-tun
comp-lzo
reneg-sec 0
verb 3
mute 3
win-sys env
script-security 2
auth-user-pass pass.auth

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

Re: How to Avoid Username & Password at each time of Connect

Post by janjust » Fri Feb 24, 2012 1:58 pm

the message
Fri Feb 24 09:50:59 2012 Sorry, 'Auth' password cannot be read from a file
pretty much says it: you will need to recompile the OpenVPN client to support reading passwords from a file.

mani313
OpenVpn Newbie
Posts: 5
Joined: Sun Jan 01, 2012 7:08 am

Re: How to Avoid Username & Password at each time of Connect

Post by mani313 » Fri Feb 24, 2012 2:50 pm

Sir,Sorry for disturbance. I could not get your point. i'm a newbie for OpenVPN. tell me what is recompile of cilent? (client mean config file or installer?)....please help me again

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

Re: How to Avoid Username & Password at each time of Connect

Post by janjust » Fri Feb 24, 2012 3:35 pm

the default openvpn client does NOT allow the username+password to be stored in a file; if you're a newbie to OpenVPN that means you're out of luck, basically, unless you're willing to learn how to build your own software.

mani313
OpenVpn Newbie
Posts: 5
Joined: Sun Jan 01, 2012 7:08 am

Re: How to Avoid Username & Password at each time of Connect

Post by mani313 » Sat Feb 25, 2012 3:04 pm

what i have to do for openVPN read username and password from a file? I hope that you'll give brief detail regarding this.....thanks in advance...

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

Re: How to Avoid Username & Password at each time of Connect

Post by janjust » Mon Feb 27, 2012 10:00 am

  • download the sources
    install the build tools
    configure OpenVPN using

    Code: Select all

    ./configure --enable-password-save
    build openvpn
if you want to build the Windows client: think twice before trying.

Post Reply