Em sistemas GNU / Linux modernos, pam_limits
pode limitar o número de sessões por usuário.
Para limitar o número de sessões por usuário, você pode adicionar entradas a um arquivo em /etc/limits.d/
(digamos, /etc/limits.d/maxlogins.conf
)
# Some of the lines in this sample might conflict and overwrite each other
# The whole range is included to illustrate the possibilities
#limit users in the users group to two logins each
@users - maxlogins 2
#limit all users to three logins each
* - maxlogins 3
#limit all users except root to 20 simultaneous logins in total
* - maxsyslogins 20
#limit in the users group to 5 logins in total
%users - maxlogins 2
#limit all users with a GID >= 1000 to two logins each
1000: - maxlogins 2
#limit user johndoe to one login
johndoe - maxlogins 2
Outros sistemas operacionais e sistemas semelhantes ao Unix sem o módulo pam_limits seriam diferentes.