Mailing List Archive
tlug.jp Mailing List tlug archive tlug Mailing List Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]Re: [tlug] executing a command that requires root from a python script
- Date: Tue, 7 Aug 2007 21:56:29 +0900
- From: tlug@example.com
- Subject: Re: [tlug] executing a command that requires root from a python script
- References: <a96ae3bb0708061851h57e2d95fr5ef8173c56d68f2c@mail.gmail.com> <46B7D8E7.9070708@simon-cozens.org>
- User-agent: KMail/1.9.6
On Tuesday 07 August 2007 11:28:55 Simon Cozens wrote: > Hector Akamine wrote: > > I would like to execute a command that requires root privileges from a > > python script, for example something like "su -l -c ifconfig" > > (I don't want my entire python script running with root privileges). > > Can you use sudo instead? That's the sort of thing it was designed for. I second Simon's suggestion for using sudo. Simply add a line in your sudo configuration file that specifies that no password is required to run the command that you need root privileges for. You can enable it for a single user, a group of users, or all users, depending on what is needed. Here is a useful reference: http://gentoo-wiki.com/Sudo_config Cheers, Travis
- Follow-Ups:
- Re: [tlug] executing a command that requires root from a python script
- From: Curt Sampson
- References:
- [tlug] executing a command that requires root from a python script
- From: Hector Akamine
- Re: [tlug] executing a command that requires root from a python script
- From: Simon Cozens
Home | Main Index | Thread Index
- Prev by Date: Re: [tlug] Email issues
- Next by Date: Re: [tlug] How to use FF's shortcuts
- Previous by thread: Re: [tlug] executing a command that requires root from a python script
- Next by thread: Re: [tlug] executing a command that requires root from a python script
- Index(es):
Home Page Mailing List Linux and Japan TLUG Members Links