Re: suid script

From: Andreas Kahari (ak+usenet_at_freeshell.org)
Date: 11/26/03


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

In article <HA3xb.1279$n31.22195@news2.e.nsc.no>, bass A wrote:
> "Ed Morton" <mortonAVOIDINGSPAM@lucent.com> wrote in message
> news:bq2fk3$t3a@netnews.proxy.lucent.com...
>> bass A wrote:
[cut]
>> > # cat kill.sh
>> > #!/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 "kill.sh 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:

    http://www.courtesan.com/sudo/

-- 
Andreas Kähäri


Relevant Pages

  • Re: user permission problems
    ... Subject: user permission problems ... set them up in the tcb and copied the kill command to their home dir. ... Here's my handy dandy asroot cookbook - see if you missed some steps: ... If you have special purpose logins to do things requiring root ...
    (comp.unix.sco.misc)
  • Permission denied when tweaking various /proc knobs (Lenny)
    ... but I get permission denied if I do it via sudo -- I have to su to root ... in order to do the adjustments. ... useful in determining why I can't do this using sudo. ...
    (Debian-User)
  • Re: probs with tar/ssh from server to server
    ... You tell the destination tar process to cd to /usr/share/fonts, ... Does your user on the remote machine have write permission for ... I don't want to do this as root. ... But if I try putting sudo in front of the 2nd tar, ...
    (comp.os.linux.misc)
  • Re: programs in /usr/sbin
    ... usr/sbin only able accessed by root. ... Give them permission to do so. ... I suggest using sudo to give specific users access to specific ...
    (comp.os.linux.misc)
  • Re: Best way to gain root privileges
    ... Root permissions in general ... Are you sure you're not conflating sudo with setuid? ... sudo is far preferred over running scripts setuid root. ... permission, then returning to normal. ...
    (comp.lang.python)