2
votes
3answers
209 views

How do I drop root privileges in shell scripts?

The "--up" option in OpenVPN is normally used for routing etc. And so it is processed before OpenVPN drops root privileges to run as nobody. However, I am invoking shell scripts that need to run as an ...
3
votes
1answer
205 views

How does having /dev/fd make running shell scripts under sudo safe?

At the end of the man page for sudo, there's the following remark: Running shell scripts via sudo can expose the same kernel bugs that make setuid shell scripts unsafe on some operating systems ...
2
votes
3answers
362 views

How does setting the Setuid bit affect shell scripts that run on boot of the system, before any login has occurred?

Would enabling the setuid bit on a shell script make a difference at all when that script is run on boot? Who would the effective user be?