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. > On Tue, 30 Nov 2021, Jeremy Ardley wrote: > > edit /etc/sudoers and modify / add > > > > username ALL=(ALL) NOPASSWD:ALL > > > > P.S. I am totally unconvinced about the arguments for using sudo rather than > > running as root. You can do exactly the same damage with sudo as being root > > user. You don't have to use sudo in the manner shown above. You can use it to allow certain users to run certain commands. I use it to run a defined set of routine commands without having to bother to switch to root, or to authenticate, or be careful, or be sober. > > P.P.S The conventional instruction is to use visudo to do the edits. Which > > means using Vi, which is another anachronism that should be humanely put > > down. Not here. The only editor I run as root is nano, whether I start it with visudo, vi, vim, emacs, etc. They're all aliased to nano (except the first), and always have been. (Or ae, back in the mists of time.) Cheers, David.