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
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.
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

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

Receive 1:1 tech help

Solve your biggest tech problems alongside global tech experts with 1:1 help.

Question has a verified solution.

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

Here is how to use MFC's automatic Radio Button handling in your dialog boxes and forms.  Beginner programmers usually start with a OnClick handler for each radio button and that's just not the right way to go.  MFC has a very cool system for handli…
Introduction: Dialogs (2) modeless dialog and a worker thread.  Handling data shared between threads.  Recursive functions. Continuing from the tenth article about sudoku.   Last article we worked with a modal dialog to help maintain informat…
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.
As many of you are aware about Scanpst.exe utility which is owned by Microsoft itself to repair inaccessible or damaged PST files, but the question is do you really think Scanpst.exe is capable to repair all sorts of PST related corruption issues?
Suggested Courses
Course of the Month12 days, 17 hours left to enroll

580 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