public inbox for gentoo-user@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-user] Permissions of /etc/sudoers
@ 2009-02-09  4:36 Stroller
  2009-02-09  6:43 ` Michael Hentsch
  2009-02-09 12:37 ` [gentoo-user] " Nikos Chantziaras
  0 siblings, 2 replies; 16+ messages in thread
From: Stroller @ 2009-02-09  4:36 UTC (permalink / raw
  To: gentoo-user

Hi there,

I'm just in the process of setting up my lovely new system :D, in the  
very first post-install steps.

I install sudo, give my user wide sudo rights and then set  
"PermitRootLogin no" in /etc/ssh/sshd_config.
(Critique of this measure welcomed).

Anyway, as root I started to edit /etc/sudoers and vim complained  
"editing a read-only file".

Sure enough, /etc/sudoers has permissions 440, so I had to `chmod 640 / 
etc/sudoers` before editing it & changing it back.

I am sure I did not have to do this last time I installed a system,  
although that would have been at least a couple of years ago.

Obviously /etc/sudoers is a security-critical file and one wishes to  
prevent attackers from editing it, but surely if a file belongs to  
root there's not much point (??) in preventing root from writing to  
it, because root can always change the permissions and edit the file,  
just as I have done.

I see from some Googling that sudo complains if the permissions on  
this file are greater than 4xx - can anyone explain why, please?

I'm sure there is something I am not understanding, but my naive  
analysis suggests the only reason for this behaviour is to  
inconvenience administrators!

Stroller.





^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2009-02-12  3:55 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-02-09  4:36 [gentoo-user] Permissions of /etc/sudoers Stroller
2009-02-09  6:43 ` Michael Hentsch
2009-02-11 23:52   ` b.n.
2009-02-11 23:57     ` [gentoo-user] " Nikos Chantziaras
2009-02-12  0:01     ` [gentoo-user] " Neil Bothwick
2009-02-12  3:55       ` Stroller
2009-02-12  0:01     ` Paul Hartman
2009-02-12  0:04       ` Neil Bothwick
2009-02-09 12:37 ` [gentoo-user] " Nikos Chantziaras
2009-02-09 13:05   ` Heiko Wundram
2009-02-09 13:15     ` Nikos Chantziaras
2009-02-09 14:20       ` Saphirus Sage
2009-02-09 14:25         ` Nikos Chantziaras
2009-02-10  8:21       ` Heiko Wundram
2009-02-09 17:02     ` Stroller
2009-02-09 18:26       ` Nikos Chantziaras

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox