This forum has been archived. All content is frozen. Please use KDE Discuss instead.

How to sudo without a password?

Tags: sudo, sudoers sudo, sudoers sudo, sudoers
(comma "," separated)
User avatar
fusion809
Registered Member
Posts
6
Karma
0
OS

How to sudo without a password?

Sat Jun 02, 2018 6:52 am
Hi,

I set up most distros I use to sudo without a password as things get quite irritating when I have to continually re-enter my password (yes I know of root session, entered by running `sudo su`, but I often do a fair bit of switching between using root privileges and not so I still get this problem). The way I allow myself to sudo without password on most distros is by:

(1) adding:

Code: Select all
%sudo ALL=(ALL) NOPASSWD: ALL


(for Ubuntu-based distros that use the sudo group, instead of the wheel group), or (2) adding :

Code: Select all
%wheel ALL=(ALL) NOPASSWD: ALL


for non-Ubuntu based distros or, if these fail or are unapplicable, (3) adding:

Code: Select all
username ALL=(ALL) NOPASSWD: ALL


(where for me username is fusion809) to /etc/sudoers, right after the line:

Code: Select all
%sudo ALL=(ALL:ALL) ALL


or for non-Ubuntu systems:

Code: Select all
%wheel ALL=(ALL:ALL) ALL


For KDE Neon git unstable neither the %sudo NOPASSWD line, nor the username NOPASSWD line seem to work, it still seems like I have to enter my password. I have even tried commenting out the
Code: Select all
%sudo ALL=(ALL:ALL) ALL
line above, yet still I need to enter my password.

Thanks for your time,
Brenton


Linux, math and medicine enthusiast that has tried over 50 different distros, but mostly just uses Gentoo, KDE neon (git unstable / user edition) and openSUSE Tumbleweed.


Bookmarks



Who is online

Registered users: Bing [Bot], Google [Bot], Yahoo [Bot]