31
October

Security: Log off a user via linux

Via skype chat today we had a client ask us a question:

How can I log out a user who is in shell?

An administrator and/or a root user can log out any user forcefully in linux.  this is done with the use of the pkill command.

pkill command syntax

pkill -KILL -u {username}

To see list of logged in user type who or w command:
# who
OR
# w

To logout user called typo3, enter:
# pkill -KILL -u typo3
OR
$ sudo pkill -KILL -u typo3

Place your comment

Please fill your data and comment below.
Name
Email
Website
Your comment