From owner-freebsd-questions Fri Mar 23 5:47:19 2001 Delivered-To: freebsd-questions@freebsd.org Received: from xyzzy.intranet.snsonline.net (CPE-61-9-165-100.vic.bigpond.net.au [61.9.165.100]) by hub.freebsd.org (Postfix) with ESMTP id 73AC337B71F for ; Fri, 23 Mar 2001 05:47:11 -0800 (PST) (envelope-from mark.sergeant@snsonline.net) Received: from xyzzy.intranet.snsonline.net (localhost [127.0.0.1]) by xyzzy.intranet.snsonline.net (8.11.3/8.11.1) with SMTP id f2NDl2O00324; Sat, 24 Mar 2001 00:47:03 +1100 (EST) (envelope-from mark.sergeant@snsonline.net) Message-Id: <200103231347.f2NDl2O00324@xyzzy.intranet.snsonline.net> Content-Type: text/plain; charset="iso-8859-1" Content-Disposition: inline Content-Transfer-Encoding: 7bit Mime-Version: 1.0 From: "Mark Sergeant" To: Bill Moran , freebsd-questions@FreeBSD.ORG Subject: Re: setuid root and shell scripts X-Mailer: Pronto v2.2.2 On freebsd Date: 23 Mar 2001 08:47:01 EST Reply-To: "Mark Sergeant" In-Reply-To: <3ABB509B.3510E21D@iowna.com> References: <3ABB509B.3510E21D@iowna.com> Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG It is not possible to have a setuid shell script. From memory it is for security reasons. Use sudo, its the way I do it :) Cheers, Mark On Fri, 23 Mar 2001 08:33:15 -0500, Bill Moran said: > 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 > > -- Writing about music is like dancing about architecture. -- Frank Zappa To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message