0

I'm writing script which needs to have root access during os.system execution (I have a couple calls of os.system). And I'm wondering what is the best way to do this? So far I tried to execute at the beginning of my program:

os.system('sudo su')

...but then user, of course, have to enter root password. And, what is worse, after program stops, terminal still holds root as logged in.

mchfrnc
  • 5,243
  • 5
  • 19
  • 37

0 Answers0