Linux Help
guides forums blogs
Home Desktops Distributions ISO Images Logos Newbies Reviews Software Support & Resources Linuxhelp Wiki

Welcome Guest ( Log In | Register )



Advanced DNS Management
New ZoneEdit. New Managment.

FREE DNS Is Back

Sign Up Now
 
Reply to this topicStart new topic
> Killing Another Users Process, Killing another users process
jbrown
post Mar 28 2003, 09:05 AM
Post #1


Whats this Lie-nix Thing?
*

Group: Members
Posts: 2
Joined: 28-March 03
Member No.: 597



Hi

I am using Redhat 8.0 (Kernel 2.4.18-27.8.0). I am trying set up two user accounts that are able to kill each others processes. I have tried creating a cmmon group that both users are members of, I have made the common group the primary group for both users, I have tried to add both users to the sys and adm groups, I tried changing file permissions of the executable that I want to kill to -rwxrwxr-x and -rwxrwxrwx, but every time I try the kill the process by the user that does not own the process I get the following:

[jbrown@jbrown-zaj bin]$ kill -9 9933
bash: kill: (9933) - Operation not permitted

All the documentation, FAQs and references I could find all say that only root can kill another users processes. Is there a way to set up two users that can kill each others processes?

Thanks
Justin
Go to the top of the page
 
+Quote Post
Corey
post Mar 28 2003, 12:27 PM
Post #2


Its GNU/Linuxhelp.net
*******

Group: Admin
Posts: 1,254
Joined: 21-September 02
From: St John's, Newfoundland, Canada
Member No.: 3



As far as i know, there really isn't any way that you can allow user x to kill user y's processes. The only method available is through using root, which doesn't sound like an appropriate path for you. I've double-checked this with the almighty google, and it seems to agree with me.

An alternative might be to check out the "sudo" command which can give a user limitied access to a limited set of commands as super user. You can set this up to allow both users access to the kill command using sude, however, they will be able to kill any process currently running on the system, which is still a security risk.


--------------------
Corey Quilliam
(former) Linuxhelp.ca Administrator
cquilliam-AT-gmail-dot-com

Want to help out Linuxhelp.net? Check out our Linuxhelp Wiki and see if there are some articles you would like to submit!!

--
Ubuntu 8.04 64-bit - Work Laptop (HP-Compaq NC6400 Core2)
Kubuntu 8.04 64-bit - Desktop (HP m8120n QuadCore)
Ubuntu 6.04 - Server (I'm not upgrading this baby until support runs out in 2012) (Some old POS dell)
Go to the top of the page
 
+Quote Post
jbrown
post Mar 31 2003, 08:48 AM
Post #3


Whats this Lie-nix Thing?
*

Group: Members
Posts: 2
Joined: 28-March 03
Member No.: 597



Thanks ... I managed to set it up with sudo

I added the following entries to "/etc/sudoers" :
testuser2 ALL = (testuser1) NOPASSWD: /usr/bin/kill
testuser2 ALL = (testuser1) NOPASSWD: /bin/kill
testuser1 ALL = (testuser2) NOPASSWD: /usr/bin/kill
testuser1 ALL = (testuser2) NOPASSWD: /bin/kill

This allows testuser1 to kill testuser2 processes using the following command:
sudo -u testuser2 kill -9 <pid>

Similarly testuser2 can kill testuser1 processes with:
sudo -u testuser1 kill -9 <pid>

The reason I have entries for both /usr/bin/kill and /bin/kill is because when I open a terminal in Gnome it uses the kill in "/usr/bin", whereas if I "su -" to the user it uses the one in "/bin" ?????

I have never used sudo before, but it is very usefull, and definately worth getting to know better.
Go to the top of the page
 
+Quote Post
Corey
post Mar 31 2003, 11:07 AM
Post #4


Its GNU/Linuxhelp.net
*******

Group: Admin
Posts: 1,254
Joined: 21-September 02
From: St John's, Newfoundland, Canada
Member No.: 3



Yes, sudo is a great command once you get to know it and respect it.


As for the kill command, I used to have a similar problem in debian before. Whenever i su as root, i couldn't run commands in /bin or /sbin (such as ifconfig for example), but when I ran it with "su -" i was able to have access to the commands. Oh well, everything works fine now tho.


--------------------
Corey Quilliam
(former) Linuxhelp.ca Administrator
cquilliam-AT-gmail-dot-com

Want to help out Linuxhelp.net? Check out our Linuxhelp Wiki and see if there are some articles you would like to submit!!

--
Ubuntu 8.04 64-bit - Work Laptop (HP-Compaq NC6400 Core2)
Kubuntu 8.04 64-bit - Desktop (HP m8120n QuadCore)
Ubuntu 6.04 - Server (I'm not upgrading this baby until support runs out in 2012) (Some old POS dell)
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



RSS Lo-Fi Version Time is now: 11th December 2017 - 02:49 AM