Моя среда - Ubuntu 10.10. Я устанавливаю /etc/security/limits.conf
а также включение модуля pam_limits.so.
* soft nofile 64000
* hard nofile 65000
Это не работает: вход в систему как root и запуск ulimit -n
отображает 1024.
Я меняю его на это:
root soft nofile 64000
root hard nofile 65000
Теперь можно войти в систему как root.
Почему не работает звездочка?
Поскольку подстановочный знак не применяется к пользователю root.
DESCRIPTION
The syntax of the lines is as follows:
<domain> <type> <item> <value>
The fields listed above should be filled as follows:
<domain>
o a username
o a groupname, with @group syntax. This should not be confused
with netgroups.
o the wildcard *, for default entry.
o the wildcard %, for maxlogins limit only, can also be used with
%group syntax.
NOTE: group and wildcard limits are not applied to the root
user. To set a limit for the root user, this field must contain
the literal username root.