OpenConnect-Cisco-AnyConnect-VPN-Server-OneKey-ocserv icon indicating copy to clipboard operation
OpenConnect-Cisco-AnyConnect-VPN-Server-OneKey-ocserv copied to clipboard

Is there anyway wo create user with php or API

Open elegance666 opened this issue 2 years ago • 1 comments
trafficstars

shell_exec("docker exec -ti ocserv ocpasswd -c /etc/ocserv/ocpasswd testUserName"); is working but it needs password in second step is there anyway to add new user by one command?

elegance666 avatar Sep 21 '23 15:09 elegance666

echo password and pipe it. Does not test the bellow command but might work with some changes. docker exec -ti ocserv ocpasswd -c echo 'password' | /etc/ocserv/ocpasswd testUserName

iw4p avatar Sep 21 '23 23:09 iw4p