From owner-freebsd-questions@FreeBSD.ORG Sat Feb 19 18:50:25 2005 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id CCF3316A4CE for ; Sat, 19 Feb 2005 18:50:25 +0000 (GMT) Received: from pigwidgeon.lancs.ac.uk (pigwidgeon.lancs.ac.uk [148.88.0.67]) by mx1.FreeBSD.org (Postfix) with ESMTP id AC77243D49 for ; Sat, 19 Feb 2005 18:50:24 +0000 (GMT) (envelope-from paul@theharbour.eclipse.co.uk) Received: from marl.lancs.ac.uk ([148.88.1.10]) by pigwidgeon.lancs.ac.uk with esmtp (Exim 4.43) id 1D2ZgO-0001QO-1P for freebsd-questions@freebsd.org; Sat, 19 Feb 2005 18:50:24 +0000 Received: from [10.34.64.106] (helo=paul1) by marl.lancs.ac.uk with esmtp (Exim 3.36 #1) id 1D2ZgO-0005dn-00 for freebsd-questions@freebsd.org; Sat, 19 Feb 2005 18:50:24 +0000 From: "Paul" To: Date: Sat, 19 Feb 2005 18:50:45 -0000 MIME-Version: 1.0 X-Mailer: Microsoft Office Outlook, Build 11.0.5510 Thread-Index: AcUWs+sQtObz22puRGynUFJupFmlSQ== X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1441 Message-Id: Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Content-Filtered-By: Mailman/MimeDel 2.1.1 Subject: shell_exec sudo problem X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 19 Feb 2005 18:50:25 -0000 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