Kicking users

George Daflidis-Kotsis gdk at demon.net
Mon Dec 7 12:36:08 EET 1998


On Sun, 6 Dec 1998, Antonis Kanavouras wrote:

> 	ypote8eistw oti o admin tyxainei na vrisketai mprosta sthn konsola otan
> diapistwnei pws kapoios la8ra trypwsas kanei poly kaka kai anarmosta
> pragmata sto syssthma kai ofeilei na ton petaxei exw parayta. Enas dikos
> mou aytosxedios tropos einai to exhs scriptaki:
> 
> #kick --- usage: kick username
> #!/bin/sh
> kill -9 `ps aux|grep $*|awk '{print $2}'`

Nai, na kaneis:

#!/bin/sh
kill -1 `ps auwx | grep $* | awk '{print $2}'`

An kaneis kill -9 to shell pou xrhsimopoiei o 8eios pou kanei ta (ftou) kaka
pragmata sto susthma sou, den 8a grapsei to bash tou to .bash_history (
an xrhsimopoiei bash) opote esu den 8a mporeis na eleg3eis ti ekane o kakos
8eios. Oxi pws den uparxei tropos gia ton kako 8eio na mh breis ti ekane
alla leme twra.

To kill -1 kanei logout to shell tou kakou 8eiou.

Filika, enas kalos 8eios.

--
-- George Daflidis-Kotsis -- <gdk at demon.net> -- Demon Internet Ltd. --

--
====================================================================
Gia boithia (h na diagrafhte) e-mail sto majordomo at argos.hol.gr
Ta archives tis listas einai sto http://www.argos.hol.gr/lists :
prin steilete kapoia erothsh psakte mipos exei hdh apanththei.
Gia opoiodipote problima stilte e-mail ston owner-linux-greek-users
====================================================================



More information about the Linux-greek-users mailing list