Re: pexpect with apache

2006-10-19 Thread [EMAIL PROTECTED]
Thank you both for your help. I don't know why I didn't think of that before. I had the expect mindset, and was determined to get it working that way. I added an entry for sudo for the script and it works without a hitch. I'm still curious to know what was going on to disallow the authentication

Re: pexpect with apache

2006-10-18 Thread martdi
Since it wont require pyexpect, and based on the operations you accomplish with your python script, maybe that a bash script instead of a python one might be the best tool for the job you're trying to accomplish. martdi wrote: > Sudo is probably the best solution here, since in the file sudo.conf

Re: pexpect with apache

2006-10-18 Thread martdi
Sudo is probably the best solution here, since in the file sudo.conf you could restrict the www user only to the python script that requires it. Also, using either sudo or the setuid flag would remove the need of pexpect since all the commands will be run as the designated user. for setuid flag:

Re: pexpect with apache

2006-10-18 Thread Lee Harr
> Well, first i don't think it is a good idea to have the python script > tu su to root, but for it to work, i think (Totally unsure about that) > www has to be in group wheel to be able to su. Maybe sudo can help here. -- http://mail.python.org/mailman/listinfo/python-list

Re: pexpect with apache

2006-10-18 Thread martdi
Well, first i don't think it is a good idea to have the python script tu su to root, but for it to work, i think (Totally unsure about that) www has to be in group wheel to be able to su. An other way to make your script run as root is to set the setuid bit on your python script to make it run as