Web Hosting Talk







View Full Version : user limit


clocker1996
03-29-2002, 02:16 AM
How can i make it so the username "chandy" can only login like say 3 times.

after that they get rejected
(ssh and ftp)

priyadi
03-29-2002, 10:23 AM
Is what you want is preventing more than 3 simultaneous login? If it is, it depends on the OS. On RedHat or PAM enabled distribution, take a look at /etc/security/limits.conf.

clocker1996
03-30-2002, 12:19 AM
How can i see if pam is enabled

priyadi
03-30-2002, 07:02 AM
Originally posted by clocker1996
How can i see if pam is enabled

What's your o/s? But generally, if you have the file unix_chkpwd or pwdb_chkpwd on your system then your system is PAM enabled.

clocker1996
03-30-2002, 03:10 PM
=\

I did this:

in my /etc/security/limits.conf

# End of file
tom hard maxlogins 1

then

i ssh'ed in more than once as tom
and it worked

Maybe i need to compile ssh with pam support?

bitserve
03-31-2002, 05:40 AM
Originally posted by clocker1996
...i ssh'ed in more than once as tom
and it worked

Maybe i need to compile ssh with pam support?

Did you add pam_limits.so to the pam service file for ssh (usually /etc/pam.d/sshd)?