Tim,
I think a better way would be 'ps ax | grep login'. 'ps aux' will
list even processes not attached to a terminal (which will not be the case
for a login shell).
I dont have two machines at home (I do at the office, but I am
answering this from home), which is why I cant assure you that this will
work for telnet logins from remote machines. I shall try this in the
office tomorrow...
Another thing that has been ignored by the posters on this topic
has been the question of how to prevent the guy from relogging on. If all
users (and not just a specific user) are to be kept out, then simply
create a file /etc/nologin ('touch /etc/nologin'). Otherwise, one has to
setup an appropriate entry in /etc/usertty corresponding to the user. The
man page for 'login' explains in detail how to go about this.
Kenneth
There is no such thing as luck. 'Luck' is nothing but an absence of bad luck.
On Wed, 21 Oct 1998, Hughes, Timothy P wrote:
> I have just tried it with another one of my accounts, and the way I found
> the process was:
>
> ps aux | grep <user>
>
> Then when I had the users shell process ID from this, I used:
>
> kill -9 <PID>
>
> And this kicked the user off, (and no visible side effects...) I used who
> to find the user name....
>
> Tim Hughes
>
>
> ----------------------------------------------
> Timothy P. Hughes
> Associate Technical Analyst
> American Academy of Orthopaedic Surgeons
> [EMAIL PROTECTED]
> ----------------------------------------------
>
> > -----Original Message-----
> > From: Rod Gotty [mailto:[EMAIL PROTECTED]]
> > Sent: Wednesday, October 21, 1998 10:50 AM
> > To: Hughes, Timothy P
> > Cc: [EMAIL PROTECTED]
> > Subject: RE: How do I...
> >
> >
> > I thought about doing that but I can't see how to correlate
> > the tty id I
> > saw with "who" with a PID for a shell in "ps".
> >
> > -Rod
> >
> > On Wed, 21 Oct 1998, Hughes, Timothy P wrote:
> >
> > > You could kill their shell. Looking in the process list
> > (using ps), you
> > > could kill the shell that they are using with the kill
> > command. However, I
> > > have never tried this, and do not know if there are any
> > side effects to
> > > doing this. (read as "really bad system stuff...")....:)
> > >
> > > Tim
> > >
> > > ----------------------------------------------
> > > Timothy P. Hughes
> > > Associate Technical Analyst
> > > American Academy of Orthopaedic Surgeons
> > > [EMAIL PROTECTED]
> > > ----------------------------------------------
> > >
> > > > -----Original Message-----
> > > > From: Rod Gotty [mailto:[EMAIL PROTECTED]]
> > > > Sent: Wednesday, October 21, 1998 7:18 AM
> > > > To: [EMAIL PROTECTED]
> > > > Subject: How do I...
> > > >
> > > >
> > > > I read the linux-learn faq and it is very good; however, it
> > > > did not answer
> > > > some of my questions:
> > > >
> > > > 1) Using "who" or "w" I can see who is logged in. How can I
> > > > kick someone
> > > > off, given the information from "who" ?
> > > >
> > > > Thanks
> > > > -Rod
> > > >
> > >
> >
>