Mailinglist Archive: opensuse (4547 mails)

< Previous Next >
Re: [SLE] Forcing a user to logout
  • From: Anders Johansson <andjoh@xxxxxxxxxx>
  • Date: Mon, 17 May 2004 15:36:01 +0200
  • Message-id: <200405171536.01690.andjoh@xxxxxxxxxx>
On Monday 17 May 2004 15.27, Prabu Subroto wrote:
> Dear my friends...
>
> Please teach me which command line in the console
> which I can use to display which users are being
> logged in. They login through NIS.
>
> And please tell me which command line that I can use
> to kick the user out (forcing logout). If they login
> through NIS.
>
> If I login into a machine as a root with ssh (ssh -l
> root 192.168.23.1), can I force with command line the
> users which login locally to be log out?

I've never seen a command to do it 'nicely', but each login has a 'mother
process'. One which governs all the others. Usually it is X, if they log in
graphically. If they log in from the command line it is one of the bash
processes. If you do 'ps aux --forest' you can get a (more or less) graphical
view of the tree structure. If you kill that top process for the user, he
will be logged out.

Note that this is not a 'nice' logout, so it may be that programs he has
running won't have time to save their data etc, so use with caution

< Previous Next >
References