limiting ftp logins of a specific user

Jeroen van Aart <[email protected]> Tue, 27 Nov 2007 11:13:05 -0800
Newsgroups gmane.network.ftp.wuftpd.user
Message-ID <[email protected]>
Hello,

I am wondering if it is possible to configure wu-ftpd to limit logins by 
a specific user (using Debian etch here). I have set a maximum amount of 
connections globally. The problem is, even after rising the max 
connections a bit, this user still saturates all available connections 
(probably a badly configured parallel uploader tool). So far I have not 
been able to find out how, through wu-ftpd, I checked docs and faqs of 
course. I could use the IP address but it changes.

I did try to use /etc/security/limits.conf with pam, but somehow it will 
not work. Testing this with another service like ssh works. 
Authentication goes through pam which checks an ldap database. Also 
wu-ftpd uses openbsd-inetd.

/etc/security/limits.conf reads:
username        hard    maxlogins       4

/etc/pam.d/wu-ftpd reads (not that I added the last entry to try and 
have it obey limits.conf):
# Standard behaviour for ftpd(8).
auth    required        pam_listfile.so item=user sense=deny 
file=/etc/ftpusers onerr=succeed

# This line is required by ftpd(8).
auth    sufficient      /lib/security/pam_ldap.so

# Uncomment this to achieve what used to be ftpd -A.
#auth   required        pam_listfile.so item=user sense=allow 
file=/etc/ftpchroot onerr=fail

# Standard blurb.
auth    required        pam_unix_auth.so shadow nullok use_first_pass
auth    required        pam_shells.so
account required        pam_unix_acct.so
session required        pam_unix_session.so
session required        /lib/security/pam_limits.so

Thank you,
Jeroen