what is the correct way to kill users session?
Richard D. Williams
richard at appgrp.net
Fri Nov 13 10:26:23 PST 2020
find the user you want to kill off;
# w -u richardw
12:21:59 up 70 days, 21:00, 94 users, load average: 6.83, 5.00, 4.12
USER TTY FROM LOGIN@ IDLE JCPU PCPU WHAT
richardw pts/2 richard 12:19 7.00s 0.18s 0.06s w -u
richardw
Here is a handy script I use;
/usr/local/kill_pts
# as root.
# usage: # kill_pts pts/2
ps --no-headers -t $1 | sort -nr | awk '{ print $1 }' | xargs /bin/kill -15
If you are a sudo user;
ps --no-headers -t $1 | sort -nr | awk '{ print $1 }' | xargs sudo
/bin/kill -15
If the target user is in as root, you may have to clean up the bash;
# ps -t pts/2
PID TTY TIME CMD
26723 pts/2 00:00:00 bash
i.e.
#kill -9 26723
On 11/12/2020 11:18 AM, Tony Freehauf via Filepro-list wrote:
> what is the correct way to kill users session? do i use
>
> kill sighup (1) Pid number ?
>
> or is it kill SIGHUP(1) ?
>
> adivse needed
>
> thanks - old tony
>
>
> _______________________________________________
> Filepro-list mailing list
> Filepro-list at lists.celestial.com
> Subscribe/Unsubscribe/Subscription Changes
> http://mailman.celestial.com/mailman/listinfo/filepro-list
--
This email has been checked for viruses by AVG.
https://www.avg.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.celestial.com/pipermail/filepro-list/attachments/20201113/714b335d/attachment.html>
More information about the Filepro-list
mailing list