2

In file /etc/security/limits.conf the maxlogins field refer to what?

If I set

 "user1            hard    maxlogins     2"

Does this mean "user1" can have two concurrent login at a time or He can login only twice - still the system reboot again?

2
  • this issue ,i found was "logged in as user1 twice" While logging for third time it said "Too many logins" - So i logged out from previous two logins ...even now it says the same error msg. Sep 10, 2010 at 6:45
  • its bug,now fixed - bugzilla.redhat.com/show_bug.cgi?id=632568 HTH Sep 14, 2010 at 6:45

2 Answers 2

1

Two logins at a time.

4
  • No that's not working...I logged as "user1" in tty1 and tty2 ...while trying to login as user1 in tty3 it says "Too many login" So far good. Sep 10, 2010 at 6:37
  • But When i logged out of tty1 and tty2 ...even now it says too many logins Sep 10, 2010 at 6:37
  • Then there might something broken in your PAM config. Sep 10, 2010 at 7:21
  • Good point,I was messing up /etc/pam.d/login file. thanks,I'll check it Sep 10, 2010 at 7:25
1

Possibly not, X sessions count as at least one login, as do terminal windows, and I believe shell scripts. In all likelihood, a hard limit of two there is way too few, I would suggest limiting the number of running processess vs the number of logins.

3
  • reproduce steps - (a)who | grep user1 (b) user1 logs into tty1 (c) user1 logs into tty2(d)who | grep user1 (e)user1 log to tty3 fails (f)logout from tty1 and tty2 (g)who | grep user1 didn't show user1 (h)log into tty3 or tty1 ..it will shortly display "Too many logins". Sep 10, 2010 at 12:17
  • I'm not sure why this happens!! Even if i increase session to 5 ...once 5 i login to 5 session as user1 ...after that i can't login evenafter logout from early session. Sep 10, 2010 at 12:18
  • Console login =1. Each terminal window opened =1 (you can open as many as you want, regardless of the limit). Each SSH session =1. Once you exceed the MAXLOGINS, SSH will reject new connections. Terminal windows will still open.
    – Scottie H
    Dec 1, 2021 at 22:27

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .