QUOTE
Originally posted by Angel78
root@main [~]# ps aux | grep pts/1
Gives:
root 13175 0.0 0.0 1404 156 pts/0 R 15:39 0:00 grep pts/1
so PID is 13175
root@main [~]# kill -9 13175
bash: kill: (13175) - No such process
:confused:
also tried :
root@main [~]# kill -9 pid 13175
bash: kill: pid: no such pid
bash: kill: (13175) - No such process
root@main [~]# kill -9 pid13175
bash: kill: pid13175: no such pid
User closed his SSH, but he is still "logged-on"
that's becuase you skipped a step...
start with :
w
get his pts/# from there, your grep only returned your grep command as the result....so of course the pid didn't exist...(Becuase the grep was done)....let's see...to avoid that ...use this grep command:
ps aux | grep pts/# | grep -v grep (this will make it ignore entries with grep in them)
just don't forget to get his pts/# from the w command first....
for example....
[root@gatekeeper root]# w
07:41:17 up 8 days, 10:31, 2 users, load average: 0.00, 0.00, 0.00
USER TTY FROM LOGIN@ IDLE JCPU PCPU WHAT
root pts/0 205.231.26.27 7:40am 43.00s 0.01s 0.01s -bash
root pts/1 205.231.26.27 7:41am 0.00s 0.01s 0.01s w
ok...pts/0 is the user we want to kill...so:
[root@gatekeeper root]# ps aux | grep pts/0 | grep -v grep
root 15334 0.0 0.2 4572 1412 pts/0 S 07:40 0:00 -bash
root 15377 0.0 0.1 2652 700 pts/0 R 07:40 0:00 ps aux
then kill -9 15334
Hope that helps