Page 1 of 1

Running client-connect script as another user?

Posted: Fri Nov 16, 2018 2:15 pm
by MatejKovacic
I try to run a script when user is connected. In OpenVPN server configuration I have:

Code: Select all

script-security 2
client-connect /etc/openvpn/
client-disconnect /etc/openvpn/
The problem is, that this script is running as user nobody, but I would run it as some other user. For instance, I have Signal-CLI application installed in my home directory. I tried to run it like this (content of /etc/openvpn/, but this is not really working:

Code: Select all

sudo -u matej /home/matej/signal-cli/bin/signal-cli -u +3**** send -m "USER CONNECTED" +3***
Any idea how to solve this?