My environment is Ubuntu 10.10
I'm setting /etc/security/limits.conf, also enable pam_limits.so module.

* soft  nofile  64000
* hard  nofile  65000

But it's not working.
Login as root and 'ulimit -n' it display 1024.

But I add a

root  soft  nofile  64000
root  hard  nofile  65000

Login as root and it works.

Why the asterisk not work?

  • Magic, you've asked seven questions and all but the most recent have answers - yet you've accepted none of those answers. Answer acceptance, which is done by you clicking the "tick" outline next to the best answer for each of your questions, drives the SF reputation system both for you and those who answer your questions. May I suggest that you take a moment to review the answers to your existing questions? It will likely make people more keen to answer this one. My apologies if you already know this. – MadHatter May 21 '12 at 6:24

Because wildcard is not applied to the root user.

man limits.conf

   The syntax of the lines is as follows:

   <domain> <type> <item> <value>

   The fields listed above should be filled as follows:


       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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.