How to do that? Without PAM on my GNU/Linux OS the number of open files is 1024 by default and cannot be raised above 4096 (via
ulimit -n NNNN command) despiting what is written in /etc/security/limits.conf. So, how does it work without PAM and how to set limits in such case?
I decided for myself to use PAM. For those who wants to exceed the hard limit of opened files without PAM, look up for the
RLIMIT_NOFILE constant in
include/linux/fs.h which defines the number of 4096 files as hard limit for rlimits. Check also CAP_SYS_RESOURCE which is required to be able to call
setrlimit() on a running system to exceed the limit. It seems there is no way to do a system call like
setrlimit() in bash, but it may be implemented as a binary executable file. Or you can make a kernel patch.