Is there any way to run a script such that it executes as another user than the person running it?
Normally (well, old-fashionedly) one would have set the SUID bit in the permissions, made the script owned by the desired user and that would be it but nowadays it no longer works because SUID on scripts is disabled.
Is there any reasonably simple way to work round this? All I have found searching so far is to write a short C program to do the SUIDĀ change and use that to execute the script. I could do this I suppose but I'd really prefer an easier way to do it as the CĀ program method needs to know both the desired UID and the name of the program to run so, while hardly complex, it will need command line parameters etc.