Community Forums
Connect with us on LinkedIn
+ Reply to Thread
Results 1 to 11 of 11
  1. #1
    cPanel Partner NOC cPanel Partner NOC Badge
    Join Date
    Jul 2003
    Location
    .pt
    Posts
    143

    Default Kill process

    Hi to all,

    i have a user that have shell access to one of my servers. I can't remove the access to him, but he start a Half Life server once in a while.

    My question is: can anyone tell me how can i put some "script" or anything else that when he run a command the process was "killed" by the server.

    I know he dont have much experience, so this is enough to make him give up of that.

    Thanks.

    cPanel.net Support Ticket Number:

  2. #2
    Member
    Join Date
    Apr 2003
    Posts
    22

    Default Re: Kill process

    Originally posted by efeito
    Hi to all,

    i have a user that have shell access to one of my servers. I can't remove the access to him, but he start a Half Life server once in a while.

    My question is: can anyone tell me how can i put some "script" or anything else that when he run a command the process was "killed" by the server.

    I know he dont have much experience, so this is enough to make him give up of that.

    Thanks.

    cPanel.net Support Ticket Number:
    If you don't want him running any proccess...then you are best off disabling his ssh access...just set him to /bin/false ...instead of /bin/bash. (and yes, I know your post says you can't remove his access....but really if you are going to kill every proccess he runs..you are removing his access...so you might as well do it the easy way.)

    cPanel.net Support Ticket Number:
    NightHawk
    We Make Server Management Easy!
    http://www.easyservermanagement.com

  3. #3
    cPanel Partner NOC cPanel Partner NOC Badge
    Join Date
    Jul 2003
    Location
    .pt
    Posts
    143

    Default

    I cant... the only problem for me is one process that have the name "hl".

    All the rest he can do... i cant really cut him ssh access.

    Please, any linux guru knows a script to do this?

    Thanks!

    cPanel.net Support Ticket Number:

  4. #4
    Member
    Join Date
    Apr 2003
    Posts
    22

    Default

    Originally posted by efeito
    I cant... the only problem for me is one process that have the name "hl".

    All the rest he can do... i cant really cut him ssh access.

    Please, any linux guru knows a script to do this?

    Thanks!

    cPanel.net Support Ticket Number:
    If you only want to stop him from running a hl server (half-life I am guessing), then just block the ports he uses for it in your firewall (check netstat -anp while it is running to determine which ones those are)...

    You could script a cron like this though..and it would kill that proccess...although this could be dangerous...since other procces could have hl in them..so use with caution..

    for i in `ps -ef | grep hl`; do
    kill -9 $i

    put that in a file .. (killhl.sh for example) ..then set your cron to run that file however often you wish it to run.

    Hope that points you in the right direction.

    cPanel.net Support Ticket Number:
    NightHawk
    We Make Server Management Easy!
    http://www.easyservermanagement.com

  5. #5
    Member
    Join Date
    Mar 2002
    Location
    Alberta, Canada
    Posts
    1,509

    Default

    I would suggest you take a Management approach, if running a half-life process is not included within the service you provide and/or goes against your TOS, simply tell them to stop. Next offence will be a warning and account termination on second incident.

    You know that if you shut down the process the Client will find out about it. They may take offence and you'll have to defend why you did what you did. In any struggle, preventing a loss (or bad situation in this case) before it happens, is always better than the alternative.

    cPanel.net Support Ticket Number:
    Helping people Host, Create, and Maintain their Web Site
    Also providing Server Admin Services - setup / troubleshooting

    http://potentproducts.com/

  6. #6
    cPanel Partner NOC cPanel Partner NOC Badge
    Join Date
    Jul 2003
    Location
    .pt
    Posts
    143

    Default

    Thanks to all for the help and advices!

    I'm go for both solutions, i will warn him and put the script in cron, just in case.

    Thanks once again!

    cPanel.net Support Ticket Number:

  7. #7
    Member
    Join Date
    Nov 2002
    Location
    All over!
    Posts
    452

    Default

    How do I find out what version of SSH I am running?

    cPanel.net Support Ticket Number:
    Knowledge is Power!

  8. #8
    Member
    Join Date
    Apr 2003
    Posts
    22

    Default

    Originally posted by ThunderHostingDotCom
    How do I find out what version of SSH I am running?

    cPanel.net Support Ticket Number:
    login to your server as admin
    su - (to root)
    ssh -V

    cPanel.net Support Ticket Number:
    NightHawk
    We Make Server Management Easy!
    http://www.easyservermanagement.com

  9. #9
    Member
    Join Date
    Nov 2002
    Location
    All over!
    Posts
    452

    Default

    OpenSSH_3.1p1, SSH protocols 1.5/2.0, OpenSSL 0x0090602f

    Not good is it?

    cPanel.net Support Ticket Number:
    Knowledge is Power!

  10. #10
    Member
    Join Date
    Apr 2003
    Posts
    22

    Default

    Originally posted by ThunderHostingDotCom
    OpenSSH_3.1p1, SSH protocols 1.5/2.0, OpenSSL 0x0090602f

    Not good is it?

    cPanel.net Support Ticket Number:
    You might want to upgrade to at least
    OpenSSH_3.5p1

    cPanel.net Support Ticket Number:
    NightHawk
    We Make Server Management Easy!
    http://www.easyservermanagement.com

  11. #11
    Member
    Join Date
    Nov 2002
    Location
    All over!
    Posts
    452

    Default

    Originally posted by NightHawk
    You might want to upgrade to at least
    OpenSSH_3.5p1

    cPanel.net Support Ticket Number:
    OK, what is the best way to update only SSH?

    cPanel.net Support Ticket Number:
    Knowledge is Power!

Similar Threads & Tags
Similar threads

  1. FastCGI not kill process
    By cesarlwh in forum cPanel and WHM Discussions
    Replies: 1
    Last Post: 05-16-2011, 07:55 AM
  2. how can i kill all process nobody?
    By eLifeCP in forum cPanel and WHM Discussions
    Replies: 5
    Last Post: 11-21-2005, 09:18 PM
  3. Can't kill process eating 98%. What is it doing?
    By pingo in forum cPanel and WHM Discussions
    Replies: 2
    Last Post: 01-04-2004, 09:27 AM
  4. Can't kill Mysqld process !!!!!!!!!!!!!!!!
    By azrael in forum cPanel and WHM Discussions
    Replies: 2
    Last Post: 12-04-2003, 11:25 PM
  5. how to kill this process?
    By katz_global in forum cPanel and WHM Discussions
    Replies: 2
    Last Post: 10-20-2003, 01:31 AM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube