flant / ovpn-admin

Simple web UI to manage OpenVPN users.
Apache License 2.0
1.35k stars 254 forks source link

Cant create new user by UI #265

Open fatsolko opened 7 months ago

fatsolko commented 7 months ago

OpenVPN is running on the same server. I copy ovpn-admin and easy-rsa to /usr/bin and run command:

sudo ovpn-admin \
--listen.host="0.0.0.0" \
--listen.port="8080"   \
--listen.base-url="/vpn/"   \
--role="master"  \
--master.host="http://127.0.0.1"  \
--ovpn.server=127.0.0.1:1194:udp  \
--mgmt=main=127.0.0.1:8989 \
--easyrsa.path="/etc/openvpn/easy-rsa" \
--ccd --ccd.path=/etc/openvpn/ccd/ \
--log.level debug

when I tried to create a new user using the UI, an error occurred:

INFO[0016] 79.175.122.19:24987 /vpn/api/user/create
DEBU[0016] cd /etc/openvpn/easy-rsa && easyrsa build-client-full xxx nopass 1>/dev/null
DEBU[0016] exit status 1 : -----
INFO[0016] Certificate for user xxx issued

but with ./openvpn-install.sh everything is ok

pashcovich commented 7 months ago

hi, what is the output of this command? which easyrsa

fatsolko commented 6 months ago

hi, what is the output of this command? which easyrsa

which easyrsa
/usr/bin/easyrsa

version

EasyRSA Version Information
Version:     3.1.2
Generated:   Fri Jan 13 15:49:32 CST 2023
SSL Lib:     OpenSSL 3.0.2 15 Mar 2022 (Library: OpenSSL 3.0.2 15 Mar 2022)
Git Commit:  354c20d82bdc5db364e197aa1290e84b46abe487
Source Repo: https://github.com/OpenVPN/easy-rsa
Host: 3.1.2 | nix | Linux | /bin/bash