Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I want the members of a certain group to kill python.

pidof python | xargs kill

This is no problem when python has been started by themself. But when root has started a python process than the users of the group can't kill python.

I can fix this to allow the group members to use kill without password.

%nohup ALL=(root) NOPASSWD: /usr/kill

But now the group members can kill each process. I only want them to kill python.

How can I give permission to a group to kill only a specific proces that has been started by root?

share|improve this question
up vote 0 down vote accepted

I would recommend writing a shell script that is allowed with NOPASSWD that simply contains the following:

killall python
#pkill could also have been used
share|improve this answer

Try this: remove the kill authority, put your kill command that kills your specific process in a shell script, make the owner of the script be root, and set the group authority for the script to be a new group containing the authorized users.

share|improve this answer
The OP states that kill cannot be used as it requires a non-static parameter. – hexafraction Jul 24 '12 at 14:34

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.