Re: suid script

From: Andreas Kahari (
Date: 11/26/03

Date: Wed, 26 Nov 2003 15:51:39 +0000 (UTC)

In article <HA3xb.1279$>, bass A wrote:
> "Ed Morton" <> wrote in message
> news:bq2fk3$
>> bass A wrote:
>> > # cat
>> > #!/bin/sh
>> > read input
>> > kill $input
>> > exit 0;
>> That doesn't kill "all" processes, it kills "a" process. What would be
>> the point of this script though - you'd now have to type " pid"
>> instead of "kill pid"?
> Well, on my system there's one user who i would like to give permission to
> kill som processes. In order to do that, I make a script, owned by root, and
> with suid bits on, which can be executed by the user to gain "extra"
> privileges.

sudo was developed exactly for this purpose, to give one or
several users permission to use one or several commands as
another user, e.g. to use kill as root.

The user would simply do "sudo kill 2378".

Sudo is here:

Andreas Kähäri