Portal Home > Knowledgebase > Articles Database > Make user2 able to kill user1's processes?
Make user2 able to kill user1's processes?
Posted by iUnknown, 06-14-2009, 08:55 AM |
Ok so here is my situation.
user1 is running some things on the server. I need user2 to be able to kill these processes (just kill, not start up again on the other user or any other extra priveledges). How can I do this?
Thanks very much.
|
Posted by apollo, 06-14-2009, 12:49 PM |
You can try allowing kill command with sudo (pattern matching), but this will be still somewhat dangerous ....
|
Posted by iUnknown, 06-14-2009, 01:05 PM |
How exactly would I do this though?
Thanks.
|
Posted by RBBOT, 06-14-2009, 01:50 PM |
You could write a script that takes a process id, greps the output of ps or examines the /proc filesystem to ensure it is owned by user2 then kills it. Then let the user1 run the script with sudo.
|
Posted by iUnknown, 06-14-2009, 04:46 PM |
That's not quite what I need. I just need it to be able to kill the process when it needs to (ie. have permission to do so). Is there no way by making it in the same group or something?
|
Posted by AquariusStorage, 06-14-2009, 04:48 PM |
Letting another user besides the administrator kill user 1's processes sounds like a security exploit ready to happen
|
Posted by iUnknown, 06-14-2009, 04:52 PM |
I'm the only person with access to both of the accounts, and the idea is that it can only kill the processes of that user and have no other extra priveledges. I can't see it easily going wrong...
|
Posted by foobic, 06-14-2009, 06:35 PM |
This is exactly what you need.
But since you're still looking for another way (do you need to do it without root access?) you could have user2 start a process running as user1, eg. user2 runs wget to call a cgi script on the user1 webspace.
|
Add to Favourites Print this Article
Also Read
DNS Server (Views: 805)
Warning! (Views: 766)