Specify User ID Range For Limit
When we want to specify one limit to the multiple users, but the users do not belong to the same group, we can specify the range of the user for which the limit has to apply. When we mention the user ID range, then the mentioned limit is applied to user IDs that belong to that range. To specify the range, use : operation. Here is an example:
1000:1020 hard nproc 50
This limit will be applied to the user IDs in the range of 1000 to 1020.
limits.conf File To Limit Users, Process In Linux With Examples
Linux gives full control over the system. In this article, we are going to learn about the file limits.conf. limits.conf is a configuration that is used to limit the resources to the user, groups. Now let’s understand the file structure of limits.conf and how can we use the limits.conf to limit resources to the user. Before moving further, note that to edit this file, you must have root permission.
The complete path of the limits.config is :
/etc/security/limits.conf
pam_module is a module that uses ulimit command to apply limits from limits.conf file.
The basic syntax of the limits.conf file is :
<domain><type><item><value>
Now let’s understand each field one by one