How to allow group members to kill process?


 
Thread Tools Search this Thread
Operating Systems AIX How to allow group members to kill process?
# 1  
Old 12-29-2008
How to allow group members to kill process?

Hey

I'm writing a script that creates some processes,and some scripts which kill those processes.

the question is Simply:
How can I allow group members to be able to kill processes created by other member at the same group?

I need your help as soon as possible

Thanks for your help in advance
# 2  
Old 12-31-2008
You cannot - not directly, that is - allow group members to kill other users processes. A user kann only kill his own processes, only root (more exactly: any user with uid 0) is allowed to kill any process.

You could create a workaround by using sudo: create a script which checks the group memberships of originator and process in question and which kills the process accordingly. Let this script run with root authority and use sudo to authenticate its use.

I hope this helps.

bakunin
# 3  
Old 12-31-2008
Quote:
Originally Posted by bakunin
You cannot - not directly, that is - allow group members to kill other users processes. A user kann only kill his own processes, only root (more exactly: any user with uid 0) is allowed to kill any process.

You could create a workaround by using sudo: create a script which checks the group memberships of originator and process in question and which kills the process accordingly. Let this script run with root authority and use sudo to authenticate its use.

I hope this helps.

bakunin

Thanks for your help but i have another solution already
# 4  
Old 01-01-2009
Quote:
Originally Posted by The Dark Knight
but i have another solution already
It would have been a really nice gesture of friendship to tell us what this solution would be. Kind of returning the favour after asking us a question and getting an attempt to help you.

Many thanks for your contribution to the community.

bakunin
# 5  
Old 01-03-2009
Quote:
Originally Posted by bakunin
It would have been a really nice gesture of friendship to tell us what this solution would be. Kind of returning the favour after asking us a question and getting an attempt to help you.

Many thanks for your contribution to the community.

bakunin

Well then

The solution(which i got from scripting section)
is that I'll use a common user who will start and kill the process

so instead of calling my script that creates the process I call another script that switches (temporary) to a common user then call the script that creates the process then switch back to the original user,and the same goes when I want to kill the process. but not forgetting that the new script should be Execute Only since it contains the password of the common user.

the whole idea is to make a single common user to create and kill the process

I hope everything is clear now

Thanks for your cooperation
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

Setfacl and granting permissions to a group and its members on a directory

Hi! I created a group HACKERS and made the user "demo" its member. $ id demo uid=500(demo) gid=500(demo) groups=500(demo),502(HACKERS) $ Next, I granted read and execute permissions to the group "HACKERS" on /var/log/httpd as shown below: setfacl -m "g:HACKERS:r-x"... (2 Replies)
Discussion started by: indiansoil
2 Replies

2. Shell Programming and Scripting

Kill an specific process ID using the KILL and GREP commands

Good afternoon I need to KILL a process in a single command sentence, for example: kill -9 `ps -aef | grep 'CAL255.4ge' | grep -v grep | awk '{print $2}'` That sentence Kills the process ID corresponding to the program CAL255.4ge. However it is possible that the same program... (6 Replies)
Discussion started by: enriquegm82
6 Replies

3. Solaris

How to list group members in solaris 9

Hi, I already gone through with old post regarding listing the group members and tried the command getenv group other the result is other::1:root i listed my part of the /etc/passwd file below test1:x:100:1::/home/test1:/bin/sh test2:x:101:1::/home/test2:/bin/ksh... (7 Replies)
Discussion started by: vr_mari
7 Replies

4. Linux

members in a group

Hi all, I am new to Linux.Can anyone tell me how to display or list all the members in a group? Thanks in advance. (9 Replies)
Discussion started by: arthi
9 Replies

5. Shell Programming and Scripting

how to kill a process initiated by other user at the same group

Hey I'm writing a script that creates some processes,and some scripts which kill those processes. the question is Simply: How can I allow a group members to be able to kill (using kill command) processes created by other user at the same group? and i need the change to be at the script... (5 Replies)
Discussion started by: The Dark Knight
5 Replies

6. Shell Programming and Scripting

How to get a list of group members?

Is there a command to get a list of group members? Something similar to the groups command, but instead of passing a username and returning groups, you pass it a groupname, and it returns members? It is difficult to do it manually because the group membership information is split across two... (5 Replies)
Discussion started by: akbar
5 Replies

7. Programming

allowing members of a group to kill a process

I've written a python program where I want to allow members of a specific group the ability to kill it, and I'm not sure how to do it. I've been looking at the setuid() and setgid() and similar functions in the os module, but haven't been able to get them to work. I can't seem to change the uid or... (1 Reply)
Discussion started by: vastcharade
1 Replies

8. Solaris

make issue when I add some members into a NIS group on solaris 9,please help !!

Hello Sir, I want to add some members into a group on NIS domain, but when I run "/usr/ccs/bin/make group" to update the group map it was failed :-( the error message is : problem storing develop... (4 Replies)
Discussion started by: lk74612
4 Replies

9. UNIX for Advanced & Expert Users

When kill doesnt work, how to kill a process ?

Hi All, I am unable to kill a process using kill command. I am using HP-UX system. I have tried with kill -9 and i have root privilages. How can i terminate this daemon ? ? ? Regards, Vijay Hegde (3 Replies)
Discussion started by: VijayHegde
3 Replies

10. UNIX for Dummies Questions & Answers

listing members of a unix group

I know there is a "groups" command to list the groups a user belongs to, but how about the opposite? Is there a standard command to find out which users belong to a particular group? (2 Replies)
Discussion started by: ovaska
2 Replies
Login or Register to Ask a Question