auth-user-pass script doesnt work..

Scripts which allow the use of special authentication methods (LDAP, AD, MySQL/PostgreSQL, etc).

Moderators: TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech

Post Reply
kimschul88
OpenVpn Newbie
Posts: 1
Joined: Fri Mar 10, 2017 8:45 am

auth-user-pass script doesnt work..

Post by kimschul88 » Fri Mar 10, 2017 9:14 am

Sorry for my english, but i need some help :(
I just copied this site http://wiki.openvpn.eu/index.php/Authen ... _am_Server
so i added 'auth-user-pass-verify C:\\Program Files\\OpenVPN\\auth.bat via-env' line in my server.ovpn file.
This is contants in auth.bat script

Code: Select all

@echo off 
set n_user=%username% %password%;
find /n "%n_user%" C:\Program Files\OpenVPN\list.txt >result.txt 
for /f "skip=1" %%a in (result.txt) do set n=%%a
if "%n%"=="----------" exit 1
exit 0
and made 'list.txt' file
like this
user1 1234;
user2 1212;

and starting server was correctly success.
But when client tried to connect, login option didn't work..

I could see login popup but client could login incorrect id and password.
i think that auth.bat doesnt work or output '0' anyway, but i dont know about sripts....

anyone can help me? :|

Post Reply