1753797 Members
7294 Online
108799 Solutions
New Discussion юеВ

Re: Login Session

 
SOLVED
Go to solution
juno2
Super Advisor

Login Session

There is limit of control the max. no. of login , how to increase the limit of the no. of login ( or how to change the no. of TTY that allow ? ) thx
11 REPLIES 11
Goran Koruga
Honored Contributor
Solution

Re: Login Session

Hi.

Check the files in /etc/security directory, namely access.conf and limits.conf.

As for the number of available PTY-s, it's hard-coded in the kernel.

CONFIG_UNIX98_PTY_COUNT=256

So change it in kernel config and recompile your kernel.

G.
juno2
Super Advisor

Re: Login Session

hi Goran Koruga ,

I can't find the statement "CONFIG_UNIX98_PTY_COUNT" in the files you said, is there other method to change the setting? thx.
Stuart Browne
Honored Contributor

Re: Login Session

Depending on which version of Linux you are using depends on how it is currently configured.

Out of the box, a RedHat system (v7+) is not limited (that I'm aware of) to the number of simultaneous logins.

This could however be achieved with an entry in /etc/security/limits.conf (if 'pam_limits.so' is used in the any of the login procedures).

As for psuedo tty's, assuming it's using /dev/pts/ style of tty's (default on anything over 2.2.16 or some such kernel), they will be dynamically created when required (the kernel defaulting at a maximum of 256 logins, RH ups this to 512).

If you need to up this value, you'll need to re-compile your kernel, tweaking the CONFIG_UNIX98_PTY_COUNT value (up to a maximum of 2048).

Viewing /proc/tty/drivers (the pty_slave value) will show how many are configured, and are in use on the system (see kernel Documentation/filesystems/proc.txt for more details).

If this doesn't answer your question, please be more specific as to your needs.
One long-haired git at your service...
juno2
Super Advisor

Re: Login Session

If i just want to change the limit of telnet , is it change the file /etc/xinetd.d/telnet ? is it require to re-comile the kernel ? thx.
Stuart Browne
Honored Contributor

Re: Login Session

The only thing you can change in /etc/xinetd.d/telnet is the value of 'instances'. If the value is missing, it means there is no limit.

What does the contents of /proc/tty/drivers say?
One long-haired git at your service...
juno2
Super Advisor

Re: Login Session

is it require to re-comile the kernel ? thx.
juno2
Super Advisor

Re: Login Session

After update /etc/xinetd.d/telnet , is it require to re-compile the kernel ? thx.
Sergejs Svitnevs
Honored Contributor

Re: Login Session

Try to enable the pam_limits module inside /etc/pam.d/login. Add the following to the end of the file:
" session required /lib/security/pam_limits.so "

Then locate limits.conf file under the /etc/security directory and change "maxlogins" options in the default policy.

Regards,
Sergejs
Goran Koruga
Honored Contributor

Re: Login Session

Ahh of course, I forgot about the xinetd part ;).

The CONFIG_... line is in part of the kernel config file. You only need to increase it if you really want to use more than 256 PTY-s.

G.