[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Don't try this at home kids



On Tue, Nov 30, 2021 at 11:12:49AM -0600, Paul Johnson wrote:
> On Mon, Nov 29, 2021 at 11:57 PM Joe Pfeiffer <pfeiffer@cs.nmsu.edu> wrote:
> > David Wright <deblis@lionunicorn.co.uk> writes:
> > > As /etc/sudoers already contains the line:
> > >
> > >   %sudo   ALL=(ALL:ALL) ALL
> > >
> > > one should be able to achieve the same effect by
> > > adding the user to the sudo group.
> >
> > Near as I can tell from my experience, that doesn't work around the
> > password requirement.
> 
> Make sure you log out and log back in after you do 'adduser joe sudo' (or
> whatever your username is). Group permissions are generally only effective
> as they were at the time of that session's login.

What you said is correct, but it doesn't contradict the paragraph that
you cited.

Adding yourself to the sudo group (and then re-logging-in) allows you
to use sudo.  It doesn't skip the password requirement.

To skip the password requirement, you need to make edits, either to the
main sudoers file or to a drop-in file.  Instructions have already been
given earlier in this thread.  It involves adding the string NOPASSWD
and some punctuation in the right position in a ridiculously overengineered
file.


Reply to: