Re: Cannot save changes to sudoers
- From: Juha Laiho <Juha.Laiho@xxxxxx>
- Date: Mon, 27 Mar 2006 19:15:19 +0000 (UTC)
"Nick.Name" <JLuckey@xxxxxxxxxxx> said:
Linux Newbie just installed Fedora Core 5 for i386. After editing
sudoers in gedit it fails to save w/ error msg:
Could not save file /etc/sudoers
You are trying to save this file on a read-only disk. Please check
that you have typed the location correctly and try again.
I am logged-in as root. I have created other files in the /etc
directory successfully.
The error message would, as Tauno suggested, indicate that the root
filesystem is mounted read-only -- but the fact that you can create
other files successfully in /etc even when you're getting this error
(I hope you tested this just now, not just "I've created files in
/etc some time in the past"), tells that the filesystem is mounted ok.
Couple of things, though:
Do not edit the sudoers file with any other command but visudo.
This is because visudo makes a syntax check to the file before saving,
and prevents you from saving a broken sudoers file. If "vi" is not
your favourite editor, you can set the environment variable VISUAL
to indicate your favourite -- for example, entering the following on
the command line:
export VISUAL=joe
visudo
.... would start sudoers editing session in joe -- and still have all
the safety belts enabled. Note that you need root privileges to run
visudo (or, actually, to edit the sudoers file at all).
It could be that for some reason your sudoers file is set immutable.
See what you get with "lsattr /etc/sudoers". If you get just
------------- /etc/sudoers
then the extended attributes have not been set, and there shouldn't
be any "extra" difficulties, but if you have anything else there
(especially a "i" somewhere among the minus signs, then the file
is set immutable, and you need to "chattr" it to not immutable;
see the manual pages for "lsattr" and "chattr" for details).
--
Wolf a.k.a. Juha Laiho Espoo, Finland
(GC 3.0) GIT d- s+: a C++ ULSH++++$ P++@ L+++ E- W+$@ N++ !K w !O !M V
PS(+) PE Y+ PGP(+) t- 5 !X R !tv b+ !DI D G e+ h---- r+++ y++++
"...cancel my subscription to the resurrection!" (Jim Morrison)
.
- References:
- Cannot save changes to sudoers
- From: Nick.Name
- Cannot save changes to sudoers
- Prev by Date: Re: Cannot save changes to sudoers
- Next by Date: Re: Cannot save changes to sudoers
- Previous by thread: Re: Cannot save changes to sudoers
- Next by thread: Re: Cannot save changes to sudoers
- Index(es):
Relevant Pages
|