unix - Multiple python scripts and root permissions -


i'm inexperienced when comes unix privileges. have python script starts other python scripts , other programs tcpdump. processes started via subprocess.popen, of programs opened in terminals (via x-terminal-emulator -e option).

some of scripts/programs need started root, however. have tried split whole functionality in smaller scripts , use sudo when it's necessary. problem setup requires me enter root password 3 or 4 times everytime start whole thing.

what looking way enter password once when start original script, grant actual root permissions @ specified places in scripts. can me out? :)

one way of doing start root, fork sub-processes , drop privileges in (sub-)processes don't need privileges.

for example, see here

there other suggestions in same post.


Comments

Popular posts from this blog

dns - How To Use Custom Nameserver On Free Cloudflare? -

python - Pygame screen.blit not working -

c# - Web API response xml language -