public inbox for gentoo-user@lists.gentoo.org
 help / color / mirror / Atom feed
From: Stroller <stroller@stellar.eclipse.co.uk>
To: gentoo-user@lists.gentoo.org
Subject: [gentoo-user] Permissions of /etc/sudoers
Date: Mon, 9 Feb 2009 04:36:20 +0000	[thread overview]
Message-ID: <E47BA080-7734-404A-B9C8-A41307B778E9@stellar.eclipse.co.uk> (raw)

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.





             reply	other threads:[~2009-02-09  4:36 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-02-09  4:36 Stroller [this message]
2009-02-09  6:43 ` [gentoo-user] Permissions of /etc/sudoers 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=E47BA080-7734-404A-B9C8-A41307B778E9@stellar.eclipse.co.uk \
    --to=stroller@stellar.eclipse.co.uk \
    --cc=gentoo-user@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox