#!/bin/bash #DESC Kills all user logins and their processes immediately (except the current user login) tty=`tty | cut -d"/" -f3-4` for user in `who | grep -v "$tty" | cut -d" " -f1` do echo "$user killed..." pkill -u $user done exit $?