Hello!
I tried to get OpenVPN to authenticate against AD following the manual here: OpenVPN auth-user-pass to Active Directory
When configured as documented the first error you run into is
Options error: --auth-user-pass-verify script fails with '/var/ipfire/
ovpnldapauth.sh': No such file or directory (errno=2)
This seems to be correctable by changing:
auth-user-pass-verify /var/ipfire/`ovpnldapauth`.sh via-env
to
auth-user-pass-verify /var/ipfire/ovpnldapauth.sh via-env
resulting in:
openvpnserver[4686]: auth_user_pass_verify_script = '/var/ipfire/ovpnldapauth.sh'
Next hurdle is the OVPN Authentication script missing the closing round brackets in the RES call. The script itself also needs some small optimizations, the search user and password should be surrounded by quotation marks to allow spaces in DN and password, otherwise you run into “Too many arguments”.
Also, the user of the script must be nobody, otherwise OpenVPN seems to be unable to call the script, which leads to using -W and moving the password for the binding user over to another file.
I edited the Wiki with my findings, does anyone of you mind to check it if things are correct?
Thanks,
Alex