LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 05-23-2012, 12:19 PM   #1
mrm5102
Member
 
Registered: Apr 2011
Location: Philadelphia
Posts: 158

Rep: Reputation: 3
Allow Any/All Users to Kill One Specific Process?


Hello All,

I know the Title is pretty self explanatory but here we go...

I know I can add to sudoers the ability for any specific user, or all users, to be able to run a command that needs higher privileges.
But is there anyway to be a little more specific? I looked through the Man Pages for sudoers but couldn't find it.

Basically I want to allow any user to be able to kill this one specific process. I couldn't really figure out how this could be done since the PID will/could be different at anytime.

Any suggestions how this may be achieved (if possible) would be great...

Thanks in Advance,
Matt
 
Old 05-23-2012, 01:09 PM   #2
cortman
Member
 
Registered: Jan 2012
Location: ZZ9 Plural Z Alpha
Distribution: Crunchbang 11, LFS 7.3, DSL 4.1.10, Lubuntu 12.10, Debian 7
Posts: 219

Rep: Reputation: 43
Have a look at this thread.
 
1 members found this post helpful.
Old 05-23-2012, 02:28 PM   #3
mrm5102
Member
 
Registered: Apr 2011
Location: Philadelphia
Posts: 158

Original Poster
Rep: Reputation: 3
Hey cortman, thanks for the reply.

Sweet, looks like what I want.... Thanks for that!


Thanks Again,
Matt
 
Old 05-23-2012, 10:31 PM   #4
cortman
Member
 
Registered: Jan 2012
Location: ZZ9 Plural Z Alpha
Distribution: Crunchbang 11, LFS 7.3, DSL 4.1.10, Lubuntu 12.10, Debian 7
Posts: 219

Rep: Reputation: 43
Quote:
Originally Posted by mrm5102 View Post
Hey cortman, thanks for the reply.

Sweet, looks like what I want.... Thanks for that!


Thanks Again,
Matt
You're quite welcome, Matt!

Be obliged if you'd mark the thread [SOLVED].

Cheers!
 
Old 05-24-2012, 10:01 AM   #5
mrm5102
Member
 
Registered: Apr 2011
Location: Philadelphia
Posts: 158

Original Poster
Rep: Reputation: 3
I was about to mark solved yesterday while I was writing this reply, but then I guess I got distracted by something and never hit "Post Quick Reply"...

While I was trying different things out yesterday I came accross "killall" which will do exactly what I want it to.
All that I needed to do is specify what is in the "Command Name" section of, for example the "ps -ef" command...

Code:
# killall -v "/usr/local/nagios/bin/nrpe"
Seems to do what I need... i.e. kill process based on the "command name".


Thanks,
Matt
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
how to kill the process after specific time? samengr Linux - General 5 02-17-2010 12:19 PM
How to kill the process running on specific port in linux rajaniyer123 Linux - General 2 12-01-2009 06:35 PM
bash `kill`: process 'B' silently dies; but process 'A' = `kill` spews back debris! GrapefruiTgirl Programming 9 06-23-2009 10:42 AM
kill specific process fj8283888 Linux - General 6 05-31-2007 07:28 AM
Urgent want to kill a users process kapsis21 AIX 1 08-30-2005 08:56 PM


All times are GMT -5. The time now is 10:57 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration