LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices

Reply
 
Search this Thread
Old 03-07-2012, 03:30 AM   #1
mbk0asis
LQ Newbie
 
Registered: Mar 2012
Posts: 3

Rep: Reputation: Disabled
Can't edit /etc/security/limits.conf


After 'sudo vi /etc/security/limits.conf',
I tried to add some statements, but I couldn't type or copy anything into it.
What could be the problem?
 
Old 03-07-2012, 03:31 AM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,414

Rep: Reputation: 1967Reputation: 1967Reputation: 1967Reputation: 1967Reputation: 1967Reputation: 1967Reputation: 1967Reputation: 1967Reputation: 1967Reputation: 1967Reputation: 1967
In all honesty, based on how you've phrased that, I'd guess at your knowledge on how to use vi? Does this help... http://www.lagmonster.org/docs/vi.html ?
 
Old 03-07-2012, 03:43 AM   #3
mbk0asis
LQ Newbie
 
Registered: Mar 2012
Posts: 3

Original Poster
Rep: Reputation: Disabled
Thanks.
I successfully typed statements but couldn't save it.

I type ':x' to save and exit, and it said type ! to override readonly set.
so I typed ':x!', and it says 'Can't open file for writing'.
 
Old 03-07-2012, 03:47 AM   #4
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,414

Rep: Reputation: 1967Reputation: 1967Reputation: 1967Reputation: 1967Reputation: 1967Reputation: 1967Reputation: 1967Reputation: 1967Reputation: 1967Reputation: 1967Reputation: 1967
if it's read only, then yes, you'd use a bang to force it. I'd do ":w!" and then ":q" but then that's habit mostly, I'd think that ":x!" should do the same. limits.conf shouldn't be read only for root though, so I'd wonder if you're doing the sudo correctly.

run "sudo -i" and that should give you a full root login, so you'll know without doubt you ARE root, then do a "vi /etc/security/limits.conf". If you're still seeing weirdness, check the permissions... "ls -l /etc/security/limits.conf".
 
Old 03-07-2012, 03:54 AM   #5
mbk0asis
LQ Newbie
 
Registered: Mar 2012
Posts: 3

Original Poster
Rep: Reputation: Disabled
It worked.
Thank you, ACID_KEWPIE!!!
You rock!!!
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
regardig /etc/security/limits.conf niaz_ph Linux - Newbie 1 10-20-2011 10:58 AM
[SOLVED] /etc/security/limits.conf and nice Mr. Alex Linux - Newbie 4 02-19-2011 05:44 PM
ulimit and /etc/security/limits.conf chakkerz Linux - General 2 01-23-2011 02:42 AM
etc/security/limits.conf - what does it do? Ken_1969 Red Hat 5 03-14-2010 05:25 PM
/etc/security/limits.conf reverse Linux - Security 4 10-20-2007 04:10 PM


All times are GMT -5. The time now is 04:45 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration