By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,846 Members | 1,862 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,846 IT Pros & Developers. It's quick & easy.

running commands with sudo & python

P: n/a
Hi!
I must execute a command with os.command(), but with root permissions.
Is there anyway to do that with python?
Thanks

Sep 28 '06 #1
Share this Question
Share on Google+
2 Replies


P: n/a
co********@googlemail.com wrote:
Hi!
I must execute a command with os.command(), but with root permissions.
Is there anyway to do that with python?
Thanks
http://en.wikipedia.org/wiki/Setuid
Of course, it's not generally a good idea to have your program keep root
permissions after it does whatever it needs to do.
Sep 29 '06 #2

P: n/a
db

Hi there,

I think you can do that with pexpect

http://pexpect.sourceforge.net/

good luck

On Thu, 28 Sep 2006 14:18:14 -0700, coldsoul4e wrote:
Hi!
I must execute a command with os.command(), but with root permissions.
Is there anyway to do that with python?
Thanks


Sep 29 '06 #3

This discussion thread is closed

Replies have been disabled for this discussion.