setuid?
Randal Schwartz
merlyn at iwarp.intel.com
Tue May 8 03:29:52 AEST 1990
In article <3830 at castle.ed.ac.uk>, egnu02 at castle (M Rae) writes:
| In article <1990May7.020504.26757 at icase.edu> arras at icase.edu (Michael Arras) writes:
| >
| > I have a shell script I would like other users to run as myself. I
| >tried:
| >
| >% chmod +s myfile
| >
|
| Use chmod giving the octal permission values
|
| % chmod 4711 myfile
|
| which gives -rws--x--x permissions.
| REAL wizards always do it this way :)
But REAL wizards wouldn't have asked this question in c.u.w, because
it is *inappropriate*. And, a real wizard would also tell you that
(1) setuid shell scripts are pretty durn dangerous (and anybody that
can't even handle turning on the setuid bit almost certainly shouldn't
be turning it on in a SHELL script), and (2) setuid shell scripts
don't work on most earlier UNIXes, because the shell is interpreting
the script. (You need a '#!'-convention, or that other hack that S5
threw in to get setuid shells to work.)
Besides, fledgling wizards should be taught to type:
chmod u+s myfile
until they get their octal down pat.
Just another UNIX wizard,
--
/=Randal L. Schwartz, Stonehenge Consulting Services (503)777-0095 ==========\
| on contract to Intel's iWarp project, Beaverton, Oregon, USA, Sol III |
| merlyn at iwarp.intel.com ...!any-MX-mailer-like-uunet!iwarp.intel.com!merlyn |
\=Cute Quote: "Welcome to Portland, Oregon, home of the California Raisins!"=/
More information about the Comp.unix.wizards
mailing list