Page 1 of 1

auth-user-pass-verify error

Posted: Wed Jul 13, 2022 12:14 pm
by brads
I tried to add the custom script to auth-user-pass-verify through server conf but when I tried to start the openvpn getting error as

auth-user-pass-verify "C:\\Program Files\\OpenVPN\\config\\author.bat" via-file
script-security 3


Options error: the --auth-user-pass-verify directive should have at most 2 parameters. To pass a list of arguments as one of the parameters, try enclosing them in double quotes ("").
Use --help for more information.

Any suggestions ?

using openvpn 2.5.7

Re: auth-user-pass-verify error

Posted: Wed Jul 13, 2022 12:26 pm
by TinCanTech
See page one of the manual.

Re: auth-user-pass-verify error

Posted: Wed Jul 13, 2022 2:40 pm
by brads
--auth-user-pass-verify cmd method: Query client for username/password and
run command cmd to verify. If method='via-env', pass
user/pass via environment, if method='via-file', pass
user/pass via temporary file.

This is what I see if I use --help with openvpn binary. I don't know what I am missing here. Can you show me what I am missing from the line I used ?

Re: auth-user-pass-verify error

Posted: Wed Jul 13, 2022 2:49 pm
by brads
auth-user-pass-verify "C:\\Program Files\\OpenVPN\\config\\author.bat" "via-file"
script-security 3

I also tried above one by reading the manual page
https://openvpn.net/community-resources ... envpn-2-4/

still same issue.

Re: auth-user-pass-verify error

Posted: Wed Jul 13, 2022 5:01 pm
by TinCanTech
TinCanTech wrote:
Wed Jul 13, 2022 12:26 pm
See page one of the manual.
Did you read page one, yet .. ?

Re: auth-user-pass-verify error

Posted: Thu Jul 14, 2022 4:08 am
by brads
Yes, its the link I have given above right ?.

Re: auth-user-pass-verify error

Posted: Thu Jul 14, 2022 12:00 pm
by TinCanTech
Yes, your link also shows the solution.

The problem is caused by the SPACE in "Program Files"

Re: auth-user-pass-verify error

Posted: Thu Jul 14, 2022 3:16 pm
by brads
auth-user-pass-verify "c:\\author.bat" via-file

auth-user-pass-verify "c:\\author.bat" "via-file"

Thanks. I tried above two lines but still getting same error.

Re: auth-user-pass-verify error

Posted: Thu Jul 14, 2022 8:40 pm
by TinCanTech
You need to post your config and log file.

viewtopic.php?t=22603#p68963