Python & Linux, some questions
Luca T.
lucat at despammed.com
Sun Mar 14 16:46:18 EST 2004
Mathias Waack wrote:
> Luca T. wrote:
>
>>1) I need to run some linux commands (from inside my app) that
>>require superuser privileges (mkfs, losetup, etc), how do i do
>>that? (I do not want to run my app with root privileges, but it
>>will just ask the user for the root password before proceeding)
>
>
> man sudo(1), su(1) or setuid-bit (chmod(1))
Hmmmm,
ok... "sudo" requires me to modify the user's system (or in other words
write in /etc/sudoers), a thing that i don't want to do. My app has not
to change the configuration of the machine.
Same thing for setuid-bit/chmod.
This leaves me with "su"... but there is a problem... "su" doesn't
execute any command, it just gives you a "prompt" as root (or another
user)... how can use this?
Thank you,
Luca
More information about the Python-list
mailing list