Password problem

Official client software for OpenVPN Access Server and OpenVPN Cloud.
Post Reply
MatVPN
OpenVpn Newbie
Posts: 16
Joined: Tue Jul 23, 2013 1:16 pm

Password problem

Post by MatVPN » Tue Jul 23, 2013 1:22 pm

Hi all,
i'm trying to log to my openvpn-server running on a virtual-xp-machine.

I have problems with autentication using username and password.

Filling out both in OpenVPN Connect i found out, that my auth-script only receives %username%. %password% is always empty - what's wrong?

Server:

Code: Select all

local 192.168.0.3
port 1195
proto udp
dev tun
tls-server
ca "xxx\\ca.crt"
cert "xxx.crt"
key "xxx.key"
dh "xxx.pem"
server 192.168.30.0 255.255.255.0
script-security 2
auth-user-pass-verify "C:\\Programme\\OpenVPN\\auth.bat" via-env
ifconfig-pool-persist ipp-pw.txt
push "route 192.168.0.0 255.255.255.0"
client-config-dir "C:\\Programme\\OpenVPN\\clients\\"
ccd-exclusive
route 192.168.30.0 255.255.255.252
keepalive 30 120
comp-lzo
persist-key
persist-tun
Client:

Code: Select all

client
dev tun
proto udp
port 1195
remote xxx
resolv-retry infinite
nobind
persist-key
persist-tun
tls-client
ca ca.crt
cert xxx.crt
key xxx.key
comp-lzo
verb 3
auth-user-pass
auth.bat:

Code: Select all

set n_user=%username%-%password%#;
echo %n_user% >c:\tmp\txt.txt
set n_user=%username% %password%
find /n "%n_user%" C:\Programme\OpenVPN\list_isk.txt >result.txt 
for /f "skip=1" %%a in (result.txt) do set n=%%a
if "%n%"=="----------" exit 1
exit 0
Thanks in advance

Mathias

MatVPN
OpenVpn Newbie
Posts: 16
Joined: Tue Jul 23, 2013 1:16 pm

Re: Password problem

Post by MatVPN » Tue Jul 23, 2013 1:46 pm

Just did some more testing:

When adding
username ;
to list_isk.txt

i can log in to the server because %password% is empty. So config seems to be OK.

Mathias

MatVPN
OpenVpn Newbie
Posts: 16
Joined: Tue Jul 23, 2013 1:16 pm

Re: Password problem

Post by MatVPN » Wed Jul 24, 2013 8:31 am

Some more testing:

moved my server (openvpn-install-2.3.2-I001-i686.exe from openvpn.net) to a real-XP-machine
->password ist still empty

installed openvpn-client.msi from openvpn.net to a real-Win7-machine
->password ist still empty

What am i doing wrong ?

Mathias

MatVPN
OpenVpn Newbie
Posts: 16
Joined: Tue Jul 23, 2013 1:16 pm

Password problem solved

Post by MatVPN » Tue Jul 30, 2013 10:22 am

I had used a description which advised to set
script-security 2
to enable execution of the password-script.
But to pass password via-env you have to set
script-security 3
Mathias

Post Reply