Run route-up/down scripts as specific user

How to customize and extend your OpenVPN installation.
Post Reply
jogo
OpenVpn Newbie
Posts: 1
Joined: Sat Oct 13, 2018 9:58 am

Run route-up/down scripts as specific user

Post by jogo » Sat Oct 13, 2018 10:11 am

Hi,

I've got openvpn working mostly fine on a pi running Raspbian but I've got some issues when the route-up/down scripts are run as root. I'm looking to run my route-up and down scripts as a specific user instead, is this possible?

The issue I'm having is that when the scripts run I keep getting issues with user limits, e.g:
unable to execute [process]: Resource temporarily unavailable

I've tried to increase the process limit for all users, as this looks like the issue below but it doesn't seem to have any effect. If anyone has any ideas how to increase these limits too I'm open to that option instead, although I've tried a few things.

Changing my route-up script to:

Code: Select all

#!/bin/sh
id
ulimit -a
Will log the following:
uid=0(root) gid=0(root) groups=0(root)
time(seconds) unlimited
file(blocks) unlimited
data(kbytes) unlimited
stack(kbytes) 8192
coredump(blocks) 0
memory(kbytes) unlimited
locked memory(kbytes) 64
process 10
nofiles 1048576
vmemory(kbytes) unlimited
locks unlimited
rtprio 0
Thanks

Post Reply