How to run kill command as non-root user.

Posted on 2003-02-28
Medium Priority
Last Modified: 2013-12-26
My company is requesting a standard user be give root access to run the kill command. To prevent this I wrote a menu driven shell in vi to kill users, lpstat and a few other commands. Everything works except for kill. I created new logins and assigned them to the system group, I did not set them to admin. These logins are still unable to run kill. Is it possible for the kill command to run without being root or using su? If so how might I go about setting that up?
Question by:joshs
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
LVL 86

Expert Comment

ID: 8044044
'kill' should work for any user, the problem is just that they will not be able to kill processes they do not have the permissions for. Most shells have a builtin 'kill', if your system uses a separate executable for that, make sure the access permissions are set accordingly, e.g.

-rwxr-xr-x    1 root     root         7964 Aug 27  2001 /bin/kill

(what I have here :o)

Expert Comment

ID: 8044226


user kill only his processes.


Author Comment

ID: 8044431
Additional information...

This is an AIX 4.3.3 box. The problem is with the medical billing software we use causes orphaned processes that constantly have to be killed out. I need the user to be able to kill processes other than their own but without having root or command prompt access.
Get MySQL database support online, now!

At Percona’s web store you can order your MySQL database support needs in minutes. No hassles, no fuss, just pick and click. Pay online with a credit card.

LVL 48

Accepted Solution

Tintin earned 200 total points
ID: 8045178
You will have to create a suid wrapper program to call a script to kill the processes.

Also, for people who like using "kill -9", please read

LVL 21

Expert Comment

ID: 8045678
Tintin is right, but rather than write your own program, check out sudo from http://www.courtesan.com/sudo/

You should still create a wrapper script e.g. so that the "sudoer" can't kill processes owned by root
LVL 48

Expert Comment

ID: 8045965
I meant to mention sudo, but I was looking at another question that said there was no command line access, so let me second tfewster's recommendation for sudo.

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This is to be the first in a series of articles demonstrating the development of a complete windows based application using the MFC classes.  I’ll try to keep each article focused on one (or a couple) of the tasks that one may meet.   Introductio…
Introduction: Displaying information on the statusbar.   Continuing from the third article about sudoku.   Open the project in visual studio. Status bar – let’s display the timestamp there.  We need to get the timestamp from the document s…
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …

764 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question