how to setup /bin/kill entry
Yocom, Ray
ryocom at ci.yakima.wa.us
Mon May 1 19:42:13 EDT 2000
I'm not a sudo expert but from what I have been reading on this list a
wrapper seems like the best solution. You could something as simple as the
following:
#! /usr/bin/sh
if [ $2 -gt 100 ]
then
exec sudo kill $1 $2
fi
This example relies on the user to supply two command line arguments (i.e..
kill -9 pid). You could of course check for the number of arguments and
handle the various possibilities.
You could also incorporate this script into a generic wrapper as explained
by Mathew Hannigan via this list last week (also does a great job explaining
how to handle the PATH var). Just check the $0 argument for the kill
command and take the appropriate action.
-----Original Message-----
From: Pat Lendon [mailto:plendon at microelectronics.com]
Sent: Monday, May 01, 2000 6:52 PM
To: sudo-users at courtesan.com
Subject: how to setup /bin/kill entry
Hi all,
How can I setup a sudo entry to allow a user to kill any process whose
pid is greater than 100?
I am thinking of something like: /usr/bin/kill, !/usr/bin/kill
[0-100]
Any thoughts...
Thank you,
-pat
More information about the sudo-users
mailing list