How would one kill a login on a machine? If for example I
connected remotely and wanted to kill a open login on the
machine I logged into.
Thanks.
--
B. L. Jilek
On Sat, 6 May 2000, Brian L. Jilek wrote: bj> How would one kill a login on a machine? If for example I bj> connected remotely and wanted to kill a open login on the bj> machine I logged into. bj> kill -9 <pid of tty> be sure you select the right one though other wise you kill the one your using at the moment. bj> Thanks. bj> -- S.Toms - tomas@primenet.com - www.primenet.com/~tomas SuSE Linux v6.3+ - Kernel 2.2.14 -- To unsubscribe send e-mail to suse-linux-e-unsubscribe@suse.com For additional commands send e-mail to suse-linux-e-help@suse.com Also check the FAQ at http://www.suse.com/Support/Doku/FAQ/
Just kill the user pid.. For example: root@pikachu:~ > w 9:33pm up 7:36, 2 users, load average: 0.40, 0.09, 0.03 USER TTY FROM LOGIN@ IDLE JCPU PCPU WHAT anderson tty1 - 1:57pm 7:35m 48.61s 0.03s startx anderson pts/2 netuno.anderson. 9:29pm 19.00s 0.12s 0.05s -bash To kill the user logged on pts/2, who is logged as anderson: root@pikachu:~> ps -ax | grep pts The result: 1435 pts/2 S 0:00 login -- anderson So, just type kill -9 1435 Done! Regards, Christiano
How would one kill a login on a machine? If for example I connected remotely and wanted to kill a open login on the machine I logged into.
Thanks. -- B. L. Jilek
| ICQ: 10733954 | Linux user: 163800 PGP: DSS 0x800B3A69 RSA 0x3F1963C5 | OS: SuSE Linux 6.3 --------------------------------------------------------- -- To unsubscribe send e-mail to suse-linux-e-unsubscribe@suse.com For additional commands send e-mail to suse-linux-e-help@suse.com Also check the FAQ at http://www.suse.com/Support/Doku/FAQ/
-- To unsubscribe send e-mail to suse-linux-e-unsubscribe@suse.com For additional commands send e-mail to suse-linux-e-help@suse.com Also check the FAQ at http://www.suse.com/Support/Doku/FAQ/
Hi Christiano! On Sat, 06 May 2000, Christiano Anderson wrote:
Just kill the user pid.. For example:
root@pikachu:~ > w 9:33pm up 7:36, 2 users, load average: 0.40, 0.09, 0.03 USER TTY FROM LOGIN@ IDLE JCPU PCPU WHAT anderson tty1 - 1:57pm 7:35m 48.61s 0.03s startx anderson pts/2 netuno.anderson. 9:29pm 19.00s 0.12s 0.05s -bash
To kill the user logged on pts/2, who is logged as anderson:
root@pikachu:~> ps -ax | grep pts
The result:
1435 pts/2 S 0:00 login -- anderson
So, just type kill -9 1435
root@crow:/home/bljilek > w
4:09am up 19 min, 4 users, load average: 0.00, 0.03, 0.06
USER TTY FROM LOGIN@ IDLE JCPU PCPU WHAT
mjilek tty1 - 4:01am 8:32 0.10s 0.07s -bash
bljilek :0 console 3:51am ? 0.00s ? -
bljilek pts/0 :0.0 3:52am 48.00s 0.71s 0.44s mutt
bljilek pts/1 :0 3:59am 0.00s 0.18s 0.04s w
root@crow:/home/bljilek > ps -ax | grep pts
759 pts/0 S 0:00 mutt
1030 pts/1 S 0:00 -bash
1092 pts/0 S 0:00 vi /tmp/mutt-crow-759-21
1120 pts/1 S 0:00 su
1121 pts/1 S 0:00 bash
1123 pts/1 R 0:00 ps -ax
1124 pts/1 S 0:00 grep pts
I'm missing something. w tells you who is logged on what terminal? But it's
showing mjilek tty1 and bljilek pts/0 & pts/1. What PID should I kill to be
rid of mjilek?
Would it be the -bash that I'm looking for on 1030?
Why does it give a tty1 for mjilek and pts's for bljilek?
If there is a good place to read up on this kind of stuff where would that
be? So I don't bug you all on this little stuff.
Thanks for the help.
--
B. L. Jilek
At 10:17 09-05-00, you wrote:
Hi Christiano!
On Sat, 06 May 2000, Christiano Anderson wrote:
Just kill the user pid.. For example:
root@pikachu:~ > w 9:33pm up 7:36, 2 users, load average: 0.40, 0.09, 0.03 USER TTY FROM LOGIN@ IDLE JCPU PCPU WHAT anderson tty1 - 1:57pm 7:35m 48.61s 0.03s startx anderson pts/2 netuno.anderson. 9:29pm 19.00s 0.12s 0.05s -bash
To kill the user logged on pts/2, who is logged as anderson:
root@pikachu:~> ps -ax | grep pts
The result:
1435 pts/2 S 0:00 login -- anderson
So, just type kill -9 1435
root@crow:/home/bljilek > w 4:09am up 19 min, 4 users, load average: 0.00, 0.03, 0.06 USER TTY FROM LOGIN@ IDLE JCPU PCPU WHAT mjilek tty1 - 4:01am 8:32 0.10s 0.07s -bash bljilek :0 console 3:51am ? 0.00s ? - bljilek pts/0 :0.0 3:52am 48.00s 0.71s 0.44s mutt bljilek pts/1 :0 3:59am 0.00s 0.18s 0.04s w root@crow:/home/bljilek > ps -ax | grep pts
Since the guy you want out is on a tty, you should have used ps -ax | grep tty here.
759 pts/0 S 0:00 mutt 1030 pts/1 S 0:00 -bash 1092 pts/0 S 0:00 vi /tmp/mutt-crow-759-21 1120 pts/1 S 0:00 su 1121 pts/1 S 0:00 bash 1123 pts/1 R 0:00 ps -ax 1124 pts/1 S 0:00 grep pts
I'm missing something. w tells you who is logged on what terminal? But it's showing mjilek tty1 and bljilek pts/0 & pts/1. What PID should I kill to be rid of mjilek?
We don't know that.
Would it be the -bash that I'm looking for on 1030?
No, that is bljilek.
Why does it give a tty1 for mjilek and pts's for bljilek?
Because mjilek is logged in on the console, and the bljilek is logged in on a pseudo-terminal (x-term or telnet or something).
If there is a good place to read up on this kind of stuff where would that be? So I don't bug you all on this little stuff.
I would suggest a generic book on UNIX. Regards Ole Kofoed Hansen okh@post.cybercity.dk ICQ# 25773325 -- To unsubscribe send e-mail to suse-linux-e-unsubscribe@suse.com For additional commands send e-mail to suse-linux-e-help@suse.com Also check the FAQ at http://www.suse.com/Support/Doku/FAQ/
Hi Ole! On Tue, 09 May 2000, Ole Kofoed Hansen wrote:
Since the guy you want out is on a tty, you should have used ps -ax | grep tty here.
Thank you. I think I've got it now.
--
B. L. Jilek
"Brian L. Jilek" wrote:
How would one kill a login on a machine? If for example I connected remotely and wanted to kill a open login on the machine I logged into.
Just kill whatever shell they're logging in using. For example, I'm logged into one of my computers (called devena) via telnet. I'm using the bash shell, so using the following (cut) output from 'ps aux', I know that I want to kill pid 3685 to shove off that user on ttyp0. So here I go and kill that login, and you can see that it works because I get thrown off the remote computer (yes, I killed myself...). devena:~ # ps aux USER PID %CPU %MEM SIZE RSS TTY STAT START TIME COMMAND root 3684 3.2 10.7 1272 704 ? S 23:57 0:00 in.telnetd root 3685 17.0 18.8 1892 1236 p0 S 23:57 0:01 -bash root 3691 0.0 8.1 944 536 p0 R 23:58 0:00 ps aux root 4874 0.0 9.2 1584 604 ? S Apr 23 0:05 /usr/sbin/named devena:~ # kill -9 3685 Connection closed by foreign host. chris@respc-csr2:~ > Hope that helps (if a bit belated), Chris -- __ _ -o)/ / (_)__ __ ____ __ Chris Reeves /\\ /__/ / _ \/ // /\ \/ / ICQ# 22219005 _\_v __/_/_//_/\_,_/ /_/\_\ -- To unsubscribe send e-mail to suse-linux-e-unsubscribe@suse.com For additional commands send e-mail to suse-linux-e-help@suse.com Also check the FAQ at http://www.suse.com/Support/Doku/FAQ/
participants (5)
-
bljilek@bigfoot.com
-
chris.reeves@iname.com
-
chrsp@ig.com.br
-
k01164@ko.sdu.dk
-
tomas@primenet.com