LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 11-23-2009, 06:31 AM   #1
thomas2004ch
Member
 
Registered: Aug 2009
Posts: 539

Rep: Reputation: 33
How to change the 'open file' for root permanently?


I will increase the number of 'open file' for root from default (1024) to 5000. I did first as follow:
Code:
ulimit -n 5000
Seems working. But as I login again the number returns to 1024. It seems in this way the number cannot be changed permanently.

Then I try edit the /etc/security/limits.conf as follow:
Code:
#<domain>      <type>  <item>         <value>
root             -     nofile       5000
But it doesn't work. The number is still 1024 as I list it with ulimit -a

Someone has idea?
 
Old 11-23-2009, 06:52 AM   #2
vishesh
Member
 
Registered: Feb 2008
Distribution: Fedora,RHEL,Ubuntu
Posts: 661

Rep: Reputation: 66
Does following line mentioned in /etc/pam.d/system-auth
---------------
session required pam_limits.so

------------
If above line is not present then system will not use /etc/security/limits.conf

Thanks
 
Old 11-23-2009, 07:07 AM   #3
thomas2004ch
Member
 
Registered: Aug 2009
Posts: 539

Original Poster
Rep: Reputation: 33
Quote:
Originally Posted by vishesh View Post
Does following line mentioned in /etc/pam.d/system-auth
---------------
session required pam_limits.so

------------
If above line is not present then system will not use /etc/security/limits.conf
Here is my /etc/pam.d/system-auth. The system uses /etc/security/limits.conf

Code:
[root@s003ap06 root]# grep session /etc/pam.d/system-auth
session     required      /lib/security/$ISA/pam_limits.so
session     required      /lib/security/$ISA/pam_unix.so
Besides, if I set following in '/etc/security/limits.conf', the number of 'open file' for user1 is changed. This confirms the system uses etc/security/limits.conf. I wonder why it doesn't work for root

Code:
#<domain>      <type>  <item>         <value>
user1             -     nofile       5000
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to change the 'open file' for root permanently? thomas2004ch Linux - Newbie 4 11-20-2009 04:31 AM
sed to change some values in a file permanently tanveer Linux - General 2 03-23-2008 01:17 PM
change file permission of a mouse device file permanently alexandre_fs Linux - General 5 01-09-2007 06:30 AM
Root cannot change file permissions. aje Slackware 3 08-12-2005 02:27 AM
Root can't change file permissions!!!!!! j_pooria Fedora 1 08-19-2004 03:29 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 10:36 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration