I am running a script as userA
with root access, from this script I want to make a popen()
call and run a different process as userB
.
os.setuid() does not seem to work for this (unless I am doing this wrong?), and I would like to avoid a linux based solution such as su -userB -c <command>
Is there a pythonic way of running a process as userB
while the script is running as userA
?