On user login I need to kick all users with same username except for the current one, thus automatically log him out from other ttys. I know that one can kick other users via slain, but not much more.
Example:
- user1 logs in via session1 => everyone with name user1 has to be kicked out of the system, except for the user in session1 => nothing happens because user1 is the first user to log in
- user1 logs in via session2 => same attempt to kick other user1s is performed as in previous step => user1 in session1 is kicked out of the system