How to limit number of Commands

Is there a way that I can limit number of commands that one user can run during period of time. For example Max 10 commands per senconds.:slight_smile:

What problem are you trying to solve?

You can limit resources, number of user processes, or file quotas, but these can prevent users from doing valid tasks.

Plus if someone executes a shell script, it may actually run lots of commands every few seconds, and be completely legitimate.

Scripts are fine, but I just want to set a limitation of commands that users can executed @ given period of time. For example, I don't want a user executes 100000000 commands in 1 mins. Is there a command for this or I have to make a script to realize it?

---------- Post updated at 10:10 AM ---------- Previous update was at 10:03 AM ----------

May be too vague or how can I limit number of outgoign emails in sendmail.cf

set ulimit in /etc/profile for certain user groups - limit the number of process

This shows you how to implement quotas in sendmail:
Other often asked questions about sendmail