Use sudo. It's the perfect tool for exactly this requirement and reimplementing it yourself is hard to do correctly and would likely lead to gaping security holes.
In reply to Re: Changing user in perl script
by tirwhan
in thread Changing user in perl script
by tsk1979
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |