Run openvpn without root privilegies

I am working with openvpn, when I type:

$ sudo openvpn

Every is fine, but when I type:

$ openvpn
bash: openvpn: command not found

I try in my Debian 8 with this instructions but in Jessie I can not find some files, for example: /etc/rc.d/init.d/openvpn-su, etc.

Then, how I run openvpn without root privileges?

Asked By: rpayanm


As openvpn needs root privileges to set routes or ip addresses for an interface it is very uncommon to run it as a user, if possible at all. But the command not found is a simple PATH topic. Check

sudo which openvpn

where root calls the binary. Normally openvpn lives in /usr/sbin, a location for daemon programs, that are started as root and possible spawn processes as users, such as apache2.

So to call openvpn as a user call


or wherever it lives on your system. Anyway for many things openvpn does it absolutely needs root privileges.

Answered By: ikrabbe
Categories: Answers Tags: ,
Answers are sorted by their score. The answer accepted by the question owner as the best is marked with
at the top-right corner.