Traffic wroteFYI this:
Apokrif wroteauth-user-pass-verify "C:/Python27/python.exe user-auth.py" via-env
could also be configured like so:
auth-user-pass-verify "C:\\Python27\\python.exe user-auth.py" via-env
Nope, OpenVPN returns error smth. like:
File "C:\Python27\python.exe user-auth.py" doesn’t exist.
Traffic wroteWhy would openvpn be able to natively run a Python or VBS script?
Do you want openvpn to come with Python and Windows script host compiled in?
I've never said that. I meat, it cannot find python.exe neither via path, because it's reduced to
PATH=C:\Windows\System32;C:\WINDOWS;C:\WINDOWS\System32\Wbem
That’s why we need "C:\Python27\python.exe"
And it ignores file association either, smth. like:
>assoc .py
.py=Python.File
>ftype Python.File
Python.File="C:\Python27\python.exe" "%1" %*
which is funny, because in sample config files line
--auth-user-pass-verify script method
shows
script parameter as absolute or relative script path only, without "python prefix".
AFAIK, it’ll work for Unix/Linux only, Windows requires very special syntax. That’s why I wrote:
Apokrif wroteThe most surprising thing was: OpenVPN cannot run python (or vbs) script without crouches! :shock:
Another workaround is to create
user-auth.cmdC:\Python27\python.exe user-auth.py
exit %errorlevel%
and use
auth-user-pass-verify user-auth.cmd via-env
Same is true for vbs, php, etc. script, you can find auth-user-pass-verify samples in this forum branch.