|
| 1 | +# /etc/security/limits.conf |
| 2 | +# |
| 3 | +# This file generate by j2 template file: files/build_templates/limits.conf.j2 |
| 4 | +# |
| 5 | +# Each line describes a limit for a user in the form: |
| 6 | +# |
| 7 | +# <domain> <type> <item> <value> |
| 8 | +# |
| 9 | +# Where: |
| 10 | +# <domain> can be: |
| 11 | +# - a user name |
| 12 | +# - a group name, with @group syntax |
| 13 | +# - the wildcard *, for default entry |
| 14 | +# - the wildcard %, can be also used with %group syntax, |
| 15 | +# for maxlogin limit |
| 16 | +# - NOTE: group and wildcard limits are not applied to root. |
| 17 | +# To apply a limit to the root user, <domain> must be |
| 18 | +# the literal username root. |
| 19 | +# |
| 20 | +# <type> can have the two values: |
| 21 | +# - "soft" for enforcing the soft limits |
| 22 | +# - "hard" for enforcing hard limits |
| 23 | +# |
| 24 | +# <item> can be one of the following: |
| 25 | +# - core - limits the core file size (KB) |
| 26 | +# - data - max data size (KB) |
| 27 | +# - fsize - maximum filesize (KB) |
| 28 | +# - memlock - max locked-in-memory address space (KB) |
| 29 | +# - nofile - max number of open file descriptors |
| 30 | +# - rss - max resident set size (KB) |
| 31 | +# - stack - max stack size (KB) |
| 32 | +# - cpu - max CPU time (MIN) |
| 33 | +# - nproc - max number of processes |
| 34 | +# - as - address space limit (KB) |
| 35 | +# - maxlogins - max number of logins for this user |
| 36 | +# - maxsyslogins - max number of logins on the system |
| 37 | +# - priority - the priority to run user process with |
| 38 | +# - locks - max number of file locks the user can hold |
| 39 | +# - sigpending - max number of pending signals |
| 40 | +# - msgqueue - max memory used by POSIX message queues (bytes) |
| 41 | +# - nice - max nice priority allowed to raise to values: [-20, 19] |
| 42 | +# - rtprio - max realtime priority |
| 43 | +# - chroot - change root to directory (Debian-specific) |
| 44 | +# |
| 45 | +# |
| 46 | +# <value> is related with <item>: |
| 47 | +# All items support the values -1, unlimited or infinity indicating |
| 48 | +# no limit, except for priority and nice. |
| 49 | +# |
| 50 | +# If a hard limit or soft limit of a resource is set to a valid value, |
| 51 | +# but outside of the supported range of the local system, the system |
| 52 | +# may reject the new limit or unexpected behavior may occur. If the |
| 53 | +# control value required is used, the module will reject the login if |
| 54 | +# a limit could not be set. |
| 55 | +# |
| 56 | +# <domain> <type> <item> <value> |
| 57 | +# |
| 58 | + |
| 59 | +# * soft core 0 |
| 60 | +# root hard core 100000 |
| 61 | +# * hard rss 10000 |
| 62 | +# @student hard nproc 20 |
| 63 | +# @faculty soft nproc 20 |
| 64 | +# @faculty hard nproc 50 |
| 65 | +# ftp hard nproc 0 |
| 66 | +# ftp - chroot /ftp |
| 67 | +# @student - maxlogins 4 |
| 68 | + |
| 69 | +{% for user in limitusers %} |
| 70 | +{{ user.username }} hard maxlogins {{ user.maxlogin }} |
| 71 | +{% endfor %} |
| 72 | + |
| 73 | +# End of file |
0 commit comments