Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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?

share|improve this question
    
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
add comment

1 Answer

Because wildcard is not applied to the root user.

man limits.conf

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.
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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