From owner-freebsd-questions Fri Mar 23 5:32:47 2001 Delivered-To: freebsd-questions@freebsd.org Received: from clmboh1-smtp3.columbus.rr.com (clmboh1-smtp3.columbus.rr.com [65.24.0.112]) by hub.freebsd.org (Postfix) with ESMTP id 2C15237B71B for ; Fri, 23 Mar 2001 05:32:43 -0800 (PST) (envelope-from wmoran@iowna.com) Received: from iowna.com (dhcp065-024-023-038.columbus.rr.com [65.24.23.38]) by clmboh1-smtp3.columbus.rr.com (8.11.2/8.11.2) with ESMTP id f2NDU0H13851 for ; Fri, 23 Mar 2001 08:30:00 -0500 (EST) Message-ID: <3ABB509B.3510E21D@iowna.com> Date: Fri, 23 Mar 2001 08:33:15 -0500 From: Bill Moran X-Mailer: Mozilla 4.76 [en] (X11; U; FreeBSD 4.2-STABLE i386) X-Accept-Language: en MIME-Version: 1.0 To: freebsd-questions@freebsd.org Subject: setuid root and shell scripts Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Wrote a quick shell script the other day and made it setuid root because there were some commands in the script that needed to run as root. Unfortunately, that doesn't seem to work. Regardless of the setuid bit being set and the owner of the file being root, the script and ever command in it runs as the calling user. I'm using the default FreeBSD shell (/bin/sh) using FreeBSD 4.2-STABLE (cvsupped around the end of Feb) I'm not sure exactly what question I'm asking. I guess I'm just curious about this behaviour. Is it the intended behaviour? If so, I guess I'll just have to use sudo to run the command as I want. I just thought it was weird that a setuid root script didn't execute that way. TIA, Bill To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message