0

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
Denys S.
  • 225
  • 1
  • 4
  • 12
  • Different users cannot have the same username. Perhaps you mean that when an user logs in, you want him to be automatically logged out from other ttys? – dr_ Nov 12 '15 at 15:33
  • Possibly [this Q&A](http://serverfault.com/q/367906/37681) is of use. – HBruijn Nov 12 '15 at 21:50
  • @HBruijn, thanks, but I need to force log outs, not limit their number. – Denys S. Nov 13 '15 at 09:56

0 Answers0