Thread
:
Need help with this command
View Single Post
RobbieThe1st
2010-09-04 , 10:08
Posts: 842 | Thanked: 1,197 times | Joined on May 2010
#
6
Well, you are going to have to gainroot before launching the python script; if the python script is launched with root privs, then it should work.
Try:
sudo gainroot
python myscript.py
edit:
Then, if you need to be able to launch it from a non-root terminal; something you can't run "sudo gainroot" from first, you will need to
add:
ALL ALL= NOPASSWD: /path/to/python /path/to/myscript.py
to the sudoers file. Then you can run "sudo python /path/to/myscript.py" with root privs, without having to enter your password.
Last edited by RobbieThe1st; 2010-09-04 at
10:13
.
Quote & Reply
|
RobbieThe1st
View Public Profile
Send a private message to RobbieThe1st
Find all posts by RobbieThe1st