Restrict the Number of Users in a Class

limit restricts the number of users in a class during given times. Here is the command, which contains fields for specifying a class, a number of users, a time range, and the name of a text file that contains an appropriate message:

limit <class> <n> <times> <message_file>

If the specified number of users from the listed class is exceeded during the given time period, the user sees the contents of the file given in the message_file parameter.

The times parameter is somewhat terse. The format for this is a comma-delimited string in the form of days, hours. Valid day strings are su , Mo , Tu , we , Th , Fr , sa , and Any . The hours are formatted in a 24-hour format. An example is as follows:

limit anonymous 10 MoTuWeThFr,Sa0000-2300 /home/ftp/.message_limit_anon_class

This line will limit the anonymous class to 10 concurrent connections on Monday through Friday, and on Saturday from midnight to 11:00 p.m. If the number of concurrent connections is exceeded or at 11:00 p.m. on Saturday, the users will see the contents of the file

/home/ftp/.message_limit_anon_class .

Syntax for finer control over limiting user connections can be found in the ftpaccess man page. Limit the Number of Invalid Password Entries

This line allows control over how many times a user can enter an invalid password before the FTP server terminates the session:

loginfails <number>

The default for loginfails is set to 5 . This command prevents users without valid passwords from experimenting until they "get it right."

Was this article helpful?

0 0

Post a comment