Paul Johnson <ba...@ursamundi.org> writes: > On Mon, Nov 29, 2021 at 11:57 PM Joe Pfeiffer <pfeif...@cs.nmsu.edu> wrote: > > David Wright <deb...@lionunicorn.co.uk> writes: > > > On Mon 29 Nov 2021 at 17:47:24 (-0500), Jude DaShiell wrote: > >> sudo doesn't ask me for my password and I didn't even touch /etc/sudoers > >> to do it. A file placed in /etc/sudoers.d with permissions of 0440 having > >> any name you choose and contents like: > >> user ALL=(ALL) NOPASSWD:ALL > >> in it with user being the account name will do it. > > > > 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.
While you're right about need to log out and back in again after changes to /etc/sudoers, my /etc/sudoers files have had the %sudo ALL=(ALL:ALL) ALL line for *years*. Do you by any chance have your system set up so you can login without a password? That's a guess at something that might explain the difference.