Re: shell_exec sudo problem

2005-02-19 Thread Bas Essers
you should take a look at apache error log to see what sudo says.
i''ve never used sudo but when i make a shell script SUID 0, bash tells me
it is too dangerous to run a script in SUID 0. and that's probably
true because a lot can be modified in a script thru the environment.


On Sat, 19 Feb 2005 18:50:45 -, Paul [EMAIL PROTECTED] wrote:
 For some reason I can't get sudo to work from an online php script using
 shell_exec.
 
 I have put this in the sudoers file:
 
 www ALL=(ALL) ALL
 
 (full access is temporary until I get it working)
 
 When I run:
 
 echo shell_exec(sudo echo hello);
 
 in a php script in a web page running on apache2, it does nothing - I don't
 get any feedback.
 
 echo shell_exec(whoami); confirms that www is the correct user.
 
 Any ideas?
 
 Paul
 
 ___
 freebsd-questions@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/freebsd-questions
 To unsubscribe, send any mail to [EMAIL PROTECTED]
 


-- 
Met vriendelijke groet,
Bas Essers
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


RE: shell_exec sudo problem

2005-02-19 Thread Paul
Found the problem in the log file - the sudo command wasn't being found.

Thanks!



-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Bas Essers
Sent: 19 February 2005 20:43
To: freebsd-questions@freebsd.org
Subject: Re: shell_exec sudo problem

you should take a look at apache error log to see what sudo says.
i''ve never used sudo but when i make a shell script SUID 0, bash tells me
it is too dangerous to run a script in SUID 0. and that's probably
true because a lot can be modified in a script thru the environment.


On Sat, 19 Feb 2005 18:50:45 -, Paul [EMAIL PROTECTED]
wrote:
 For some reason I can't get sudo to work from an online php script using
 shell_exec.
 
 I have put this in the sudoers file:
 
 www ALL=(ALL) ALL
 
 (full access is temporary until I get it working)
 
 When I run:
 
 echo shell_exec(sudo echo hello);
 
 in a php script in a web page running on apache2, it does nothing - I
don't
 get any feedback.
 
 echo shell_exec(whoami); confirms that www is the correct user.
 
 Any ideas?
 
 Paul
 
 ___
 freebsd-questions@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/freebsd-questions
 To unsubscribe, send any mail to
[EMAIL PROTECTED]
 


-- 
Met vriendelijke groet,
Bas Essers
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]