From: "Walter Dnes" <waltdnes@waltdnes.org>
To: gentoo-user@lists.gentoo.org
Subject: Re: [gentoo-user] Update to /etc/sudoers disables wheel users!!!
Date: Wed, 26 Oct 2022 02:31:35 -0400 [thread overview]
Message-ID: <Y1jURxx+uvtr5E/Y@waltdnes.org> (raw)
In-Reply-To: <AM6PR10MB2440A940379969FE0A2D6D32EF309@AM6PR10MB2440.EURPRD10.PROD.OUTLOOK.COM>
On Wed, Oct 26, 2022 at 05:04:35AM +0200, Ramon Fischer wrote
> Hello Walter,
>
> I do not think, that this is a bug, since it is the default file, which
> should not be edited by the user.
Firstly "grep -i uncomment /etc/sudoers" results in...
## Uncomment to enable special input methods. Care should be taken as
## Uncomment to use a hard-coded PATH instead of the user's to find commands
## Uncomment to send mail if the user does not enter the correct password.
## Uncomment to enable logging of a command's output, except for
## Uncomment to allow members of group wheel to execute any command
## Uncomment to allow members of group sudo to execute any command
## Uncomment to allow any user to run sudo if they know the password
...I.e. the file is explicitly telling you to edit it if required!!!
> All changes should be done in "/etc/sudoers.d/" to avoid such cases.
My regular user has script "settime" in ${HOME}/bin
#!/bin/bash
date
/usr/bin/sudo /usr/bin/rdate -nsv ca.pool.ntp.org
/usr/bin/sudo /sbin/hwclock --systohc
date
/etc/sudoers.d/001 has, amongst other things, two lines...
waltdnes x8940 = (root) NOPASSWD: /sbin/hwclock --systohc
waltdnes x8940 = (root) NOPASSWD: /usr/bin/rdate -nsv ca.pool.ntp.org
User "waltdnes" is a member of "wheel". If the "wheel" line is
uncommented in /etc/sudoers, sudo works for me. If the "wheel" line is
commented, then sudo breaks for my regular user.
> I kept mine unchanged from 2nd October and only have two uncommented lines:
>
> [...]
> root ALL=(ALL:AlL) ALL
> [...]
> @includedir /etc/sudoers.d
>
> I am using version "1.9.11_p3-r1".
Me too.
There seem to be two different approaches here. The loose approach is
to allow a user to run "sudo <whatever I damn well want>". A more locked
down approach allows regular users to run "sudo <very specific command>".
This guards against "fat-finger-syndrome". I go with the more locked
down approach
--
I've seen things, you people wouldn't believe; Gopher, Netscape with
frames, the first Browser Wars. Searching for pages with AltaVista,
pop-up windows self-replicating, trying to uninstall RealPlayer. All
those moments, will be lost in time like tears in rain... time to die.
next prev parent reply other threads:[~2022-10-26 6:31 UTC|newest]
Thread overview: 47+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-26 2:34 [gentoo-user] Update to /etc/sudoers disables wheel users!!! Walter Dnes
2022-10-26 3:04 ` Ramon Fischer
2022-10-26 3:15 ` Grant Taylor
2022-10-26 3:34 ` Ramon Fischer
2022-10-26 3:40 ` Ramon Fischer
2022-10-26 3:44 ` Matt Connell
2022-10-26 16:21 ` Grant Taylor
2022-10-26 17:15 ` Neil Bothwick
2022-10-26 17:31 ` Rich Freeman
2022-10-26 20:17 ` Dale
2022-10-26 21:26 ` [gentoo-user] " Grant Edwards
2022-10-26 22:44 ` Dale
2022-10-27 1:23 ` Ramon Fischer
2022-10-27 3:01 ` Dale
2022-10-27 7:55 ` Ramon Fischer
2022-10-27 7:59 ` Ramon Fischer
2022-10-26 23:55 ` Rich Freeman
2022-10-26 6:31 ` Walter Dnes [this message]
2022-10-26 7:42 ` [gentoo-user] " Ramon Fischer
2022-10-26 11:31 ` Rich Freeman
2022-10-26 14:41 ` Ramon Fischer
2022-10-26 16:52 ` Grant Taylor
2022-10-26 17:12 ` [gentoo-user] " Grant Edwards
2022-10-26 17:54 ` Ramon Fischer
2022-10-26 18:04 ` [gentoo-user] " Ramon Fischer
2022-10-26 18:22 ` Neil Bothwick
2022-10-26 19:28 ` Grant Taylor
2022-10-26 20:08 ` Neil Bothwick
2022-10-26 20:17 ` Grant Taylor
2022-10-26 21:13 ` Neil Bothwick
2022-10-26 21:29 ` Grant Taylor
2022-10-26 21:48 ` Ramon Fischer
2022-10-26 23:06 ` Grant Taylor
2022-10-27 1:27 ` Ramon Fischer
2022-10-27 1:47 ` Grant Taylor
2022-10-27 7:53 ` Ramon Fischer
2022-10-26 18:35 ` Jack
2022-10-26 18:38 ` Ramon Fischer
2022-10-26 20:06 ` Neil Bothwick
2022-10-26 21:27 ` Ramon Fischer
2022-10-26 21:30 ` Grant Taylor
2022-10-26 19:31 ` Grant Taylor
2022-10-26 19:26 ` Grant Taylor
2022-10-26 18:04 ` Ramon Fischer
2022-10-26 16:38 ` Grant Taylor
2022-10-26 3:12 ` Matt Connell
2022-10-26 4:00 ` Anna “CyberTailor”
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=Y1jURxx+uvtr5E/Y@waltdnes.org \
--to=waltdnes@waltdnes.org \
--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