Find the answer to your Linux question:
Results 1 to 5 of 5
how many users can simultaneously login in a linux system? Can we write a shell script to know this? Is it possible to use shell script for login for total ...
  1. #1
    Just Joined!
    Join Date
    Sep 2009
    Posts
    2

    Question max user support in linux

    how many users can simultaneously login in a linux system? Can we write a shell script to know this? Is it possible to use shell script for login for total user supported, from the same machine and remote host(telnet, ssh, etc.)?

  2. #2
    Linux Guru Rubberman's Avatar
    Join Date
    Apr 2009
    Location
    I can be found either 40 miles west of Chicago, or in a galaxy far, far away.
    Posts
    8,974
    I don't know if there is a maximum login count, though since each active login requires a tty entry that can be considered a limit. Most linux systems are configured for up to 63 ttys by default, though this can be increased if necessary. So, in all practicality, AFAIK, there is no specific limit on the number of active logins on a system. I'm sure that on a high-end system you could easily handle 250 or more users.
    Sometimes, real fast is almost as good as real time.
    Just remember, Semper Gumbi - always be flexible!

  3. #3
    Linux Newbie tetsujin's Avatar
    Join Date
    Oct 2008
    Posts
    115
    Quote Originally Posted by Rubberman View Post
    I don't know if there is a maximum login count, though since each active login requires a tty entry that can be considered a limit. Most linux systems are configured for up to 63 ttys by default, though this can be increased if necessary.
    If these are graphical logins or logins over the network, then it's pseudo-TTYs, not normal TTYs, which are important... (Though I guess really they're all pseudo-TTYs unless you've got a real Teletype sitting around...) Any running ssh connection, xterm, or session in "screen" would use up one PTY.

    On my system (Debian on 64-bit) the limit is currently 4096 PTYs, according to /proc/sys/kernel/pty/max. As far as I can tell there's no startup script on the system which has changed this from the kernel's default setting. This is using the PTY master clone device, of course. Using BSD-style PTYs (currently disabled on my system, and good riddance!) one is limited by the naming convention to a limit of 256 PTYs total...

  4. #4
    Just Joined!
    Join Date
    Sep 2009
    Posts
    2
    so you mean xterm also uses a terminal. In that case, if logged in as a normal user and then run a script which will invoke /proc/sys/kernel/pty/max xterms, then no other user can log into the system. is it so?

  5. #5
    Linux Newbie tetsujin's Avatar
    Join Date
    Oct 2008
    Posts
    115
    Quote Originally Posted by narik View Post
    so you mean xterm also uses a terminal. In that case, if logged in as a normal user and then run a script which will invoke /proc/sys/kernel/pty/max xterms, then no other user can log into the system. is it so?
    Exactly. Or rather, I think that's what happens. I haven't tested it. It seems feasible, at least, that the kernel would recognize that they've all been allocated and increase the limit...

    The pseudo-terminals are sort of like pipes in that they're used as a pathway to channel textual data to and from the display - the data may come from/go to a GUI program like xterm or from a networking daemon like sshd, or whatever else... You can think of the pseudo-TTY as the application's connection to the xterm or sshd or whatever. As far as the application's concerned, it's just connected to "a TTY" which probably acts as its stdin and stdout. The pseudo TTY takes the data the application wrote to its stdout (its end of the pTTY), and passes it to the other end - where the xterm process can read it and render it to the screen.

    There are a few technical and traditional things that distinguish a pseudo-TTY from a regular pipe, though - TTY devices provide features like signal handling/special character handling, different input buffering modes (line-buffering versus not, etc.), input echo control, screen size change notification events, and so on... And some programs will behave differently if they know they are connected to a TTY device as opposed to not...

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
...