suid script

From: bass A (hotletter_at_spammail.com)
Date: 11/26/03


Date: Wed, 26 Nov 2003 13:48:39 +0100

Hi all! Hope you can help a newbie with this problem

I have a script 'kill.sh', which is supposed to let a user kill "all
processes" on a machine. And yes, this is just for testing, and not an
actual production script :-,

This is the syntax:
# cat kill.sh
#!/bin/sh
read input
kill $input
exit 0;
#
And this is the bits:
#ls -la
-rwsr-Sr-t 1 root root 1749 Nov 26 13:10 kill.sh
#

However, when executing this script other than as root, I get an "Operation
not permitted". Works fine as root.

This is on Linux/Red Hat, but the revised script is supposed to work on
Solaris.

Hope you can help!

-Regrds, Bassarabbas



Relevant Pages

  • Re: Kill process
    ... > Is there a way to let a user kill a local process without giving him admin ... You could script it by using ... the obvious batch-file-method anyone executing the file can also read ...
    (microsoft.public.win2000.security)
  • IBM Informix Web DataBlade: Local root by design
    ... IBM Informix Web DataBlade: Local root by design ... Impact: Any user who can: 1) Save a Perl script anywhere on the server's ... admin right on any database can do it by loading the WDB module into ...
    (Bugtraq)
  • RE: Linux hacked
    ... I would also suggest using a simple script in the future that alerts ... Subject: Linux hacked ... To get back into your account you want to use, at the boot manager ... boot normally and you should be able to login as root with your new ...
    (Security-Basics)
  • Re: BSDstats v3.0 - The Security Rewrite
    ... The bsdstats script could easily pick up that entry and set ... a management machine, and that management machine only has ... Email is sent to root containing IDTOKEN= as generated by host, root forwards that to rpt@xxxxxxxxxxxx, rpt@xxxxxxxxxxxx sends back KEY= value ... second time, submits report values to root, root forwards that to rpt@xxxxxxxxxxxx ... ...
    (freebsd-questions)
  • Re: Great SWT Program
    ... from a terminal emulator and log in as root there. ... terminal-emulator windows open, ... The script, suid-root utility, or whatever would ... the command interpreter with root privileges ...
    (comp.lang.java.programmer)