pts + kill problems
Hello,
I have a problem of killing or closing a login session. Its kind of hard to kill it, since its not showing on the pid list or anything. Its "showed" 3 places: * finger: cereal Aleks *pts/9 Aug 7 15:47 (host.name) * w: one of the 9 users current users. * users: one of the users displayed. I have had several of these zombie-pts but they are supposed to be removed by the kernel right ? Its not in /dev/pts btw: Its slack 7.2 Anyone knows how i get this out of the system without rebooting ? its kind of irritating ! :) :confused: |
I'm confused - you have a process that you are trying to kill, thats a login shell that doesn't showup when you do a
Code:
ps -ef | more cheers Jamie... |
Hey,
Quote:
The thing is that i want that "login session" to be removed from the stats when running "w" , "finger" and "users" Its a login i cant kill. Its some file or something i need to remove i think. Its not on the ps list. Its a zombie without a ID. What does the star mean in this anyways? cereal Aleksander *pts/9 Aug 7 15:47 (host.name) its allso printing when running "finger" : finger: /dev//pts/9: No such file or directory finger: /dev//pts/14: No such file or directory finger: /dev//pts/27: No such file or directory |
Uhm... I don't understand - you want to kill off a login shell yeah?? Thats the only way to stop a logged in use showing in the output of finger or w or whatever, mind you this will often kill all the processes that a user is running.
And yeah, ps -ef should show everything, observe, getty's waiting for logins, and my bash login shell as root: Code:
root 198 1 0 Aug21 tty1 00:00:00 [agetty] If you are getting errors about /dev/ it normally means you have special files that point to things that don't exist. Have you got "Unix98 PTY Support" in your kernel??? What have I misunderstood??? cheers Jamie... |
hey, thanks :P
But its not that simple. I know how to kill / find pids in the system. I have asked 50 ppl soon, and the best answar i got was: Quote:
I heard it could be something wrong with lastlogin og wtmp, and their the reson i get this "zombies". Its wrong to call them that, buts that what it is. Its a thing not living but is showed. Where does all programs get the info about this ? It has to be a proc file? I wont reboot! :) U see what i mean now? Its _NOT_ on the pid list, so i cant kill it with any pid nr. Its something in a file or something. Thanks! ;) |
Now I get ya!!
Yeah - I'd agree that is may be a problem with wtmp. Try erasing and recreating it if you want, I think it's probably best to kick any users off the system first though. You should just be able to use Code:
rm wtmp && touch wtmp && chmod 644 As for the star (in an earlier post) - I would *guess* that was your point of login, so the pts is linked to a login shell, not just a shell spawned later in the session. (Linux differentiates between the two) cheers Jamie... |
Hi,
I had the same problem and solved it removing /var/run/utmp and creating a new one as root, that is: cd /var/run rm utmp touch utmp chgrp utmp utmp chmod g+w utmp after that, if you execute who, no user will be shown, but they will be updated on the next login. Hope it helps... |
All times are GMT -5. The time now is 09:21 AM. |