auth-user-pass-verify error

How to customize and extend your OpenVPN installation.

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

Post Reply
brads
OpenVpn Newbie
Posts: 5
Joined: Wed Jul 13, 2022 12:08 pm

auth-user-pass-verify error

Post by brads » Wed Jul 13, 2022 12:14 pm

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

TinCanTech
OpenVPN Protagonist
Posts: 11137
Joined: Fri Jun 03, 2016 1:17 pm

Re: auth-user-pass-verify error

Post by TinCanTech » Wed Jul 13, 2022 12:26 pm

See page one of the manual.

brads
OpenVpn Newbie
Posts: 5
Joined: Wed Jul 13, 2022 12:08 pm

Re: auth-user-pass-verify error

Post by brads » Wed Jul 13, 2022 2:40 pm

--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 ?

brads
OpenVpn Newbie
Posts: 5
Joined: Wed Jul 13, 2022 12:08 pm

Re: auth-user-pass-verify error

Post by brads » Wed Jul 13, 2022 2:49 pm

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.

TinCanTech
OpenVPN Protagonist
Posts: 11137
Joined: Fri Jun 03, 2016 1:17 pm

Re: auth-user-pass-verify error

Post by TinCanTech » Wed Jul 13, 2022 5:01 pm

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

brads
OpenVpn Newbie
Posts: 5
Joined: Wed Jul 13, 2022 12:08 pm

Re: auth-user-pass-verify error

Post by brads » Thu Jul 14, 2022 4:08 am

Yes, its the link I have given above right ?.

TinCanTech
OpenVPN Protagonist
Posts: 11137
Joined: Fri Jun 03, 2016 1:17 pm

Re: auth-user-pass-verify error

Post by TinCanTech » Thu Jul 14, 2022 12:00 pm

Yes, your link also shows the solution.

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

brads
OpenVpn Newbie
Posts: 5
Joined: Wed Jul 13, 2022 12:08 pm

Re: auth-user-pass-verify error

Post by brads » Thu Jul 14, 2022 3:16 pm

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.

TinCanTech
OpenVPN Protagonist
Posts: 11137
Joined: Fri Jun 03, 2016 1:17 pm

Re: auth-user-pass-verify error

Post by TinCanTech » Thu Jul 14, 2022 8:40 pm

You need to post your config and log file.

viewtopic.php?t=22603#p68963

Post Reply