Date: 23 Mar 2001 08:47:01 EST From: "Mark Sergeant" <mark.sergeant@snsonline.net> To: Bill Moran <wmoran@iowna.com>, freebsd-questions@FreeBSD.ORG Subject: Re: setuid root and shell scripts Message-ID: <200103231347.f2NDl2O00324@xyzzy.intranet.snsonline.net> In-Reply-To: <3ABB509B.3510E21D@iowna.com> References: <3ABB509B.3510E21D@iowna.com>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200103231347.f2NDl2O00324>