i have a problem with my openvpn config. i wrote an sh-script for user-pass-verify which works stand-alone. but im always getting the error "WARNING: Failed running command (--auth-user-pass-verify): could not execute external program" in the log.
I googled a lot but have still no solution for it.
Here is my server.conf:
And the login.sh-script:port 11950
proto udp
dev tap0
ca ca-homeserver.crt
cert homeserver.crt
key homeserver.key
dh dh4096.pem
server-bridge 10.5.9.1 255.255.255.0 10.5.9.201 10.5.9.250
push "route 10.5.9.0 255.255.255.0"
user root
reneg-sec 68400
tls-auth ta.key
username-as-common-name
auth-user-pass-verify /etc/openvpn/script/login.sh via-env
client-to-client
keepalive 10 120
comp-lzo
max-clients 50
persist-key
persist-tun
script-security 3 system
status homeserver.log
log-append openvpn.log
verb 3
i think there are some problems with file permissions, but i tested "chmod 777 login.sh" and it had no effect. always getting the could-not-execute error...username=$1
password=$2
passwordhash=$(mysql -h'localhost' -P'3306' -u'dbuser' -p'dbpass' dbname -sN -e "select right((select password from table where uid = '$username'), 60)")
returnval=$(php /etc/openvpn/script/newhashtest.php "$password" "$passwordhash")
[ $returnval ] && echo "auth for user '$username' ok" && exit 0 || echo "auth failed"; exit 1
i had the same server.conf running on my server before i formatted it with debian 8 jessie last week to give everything a new start.
i hope someone can help me fixing this problem. thanks a lot!