How use "sudo" without password?

Am the only user, and for 9 years with SUSE I have managed to avoid having to enter password. I have run /usr/sbin/visudo + added myself to the wheel group and I have entered “super-user-command” to kdesurc.

But with Leap42.1 none of this works. Please advise!

It should work.

Leap 42.1 uses the KF5 based kdesu by default. Its settings are in ~/.config/kdesurc, not ~/.kde4/share/config/kdesurc.

So, does sudo itself work like you expect it?

If not, just running visudo and adding your user to the “wheel” group doesn’t change anything. You have to actually modify the visudoers (via visudo) file accordingly. What changes did you make exactly?
You either have to uncomment the line marked in red, i.e. remove the ‘#’ at the start of the line:

## Uncomment to allow members of group wheel to execute any command
# %wheel ALL=(ALL) ALL

## Same thing without a password

(note that this is from 13.2, I’m not completely sure that the file is exactly the same in Leap 42.1)

Or add a similar line for your user explicitly, then you don’t even have to be part of the wheel group.


Thanks wolfi323 %wheel ALL=(ALL) NOPASSWD: ALL is just like this, added username ALL=(ALL) NOPASSWD: ALL - no improvement. But what did help was copying kdesurc over to your suggested place ~/.config/kdesurc No longer did I have to enter the password for my root konqueror etc. Remaining problem:

Terminal Super User Mode still required password - but I guess it is not using sudo but su!? So I made myself a new root terminal “kdesu konsole” run as different user, and that seems to work ok without requiring password.

Thanks again!

“Terminal - Super User Mode” is not a Konsole run as root, there’s no point in doing that.
Actually it is just a Konsole profile, that runs “su -” as startup command instead of a standard shell.
You can modify the profile by selecting “Manage profiles” or “Edit current profiles” in the “Settings” menu.

I suppose something like “sudo bash” or “sudo su” should work.

That’s nothing new in Leap though, btw…

Wolfi: Can you give me more info on this? I did not realize it was possible to use sudo without entering a pw.

I do not have ~/.config/kdesurc in my Leap 42.1 KDE install, but it does exist in the .kde4 location you mentioned.

Where can I find info on setting this up so sudo does not require me to enter the pw?

thanks, Jon

You can, you have to modify sudo’s config for this (with visudo). See my previous post.

But your question actually is about kdesu it seems.
kdesu uses su by default, so doesn’t use sudo’s settings.
But it can be configured to use sudo instead.
See e.g. here:

(for the KF5 version, you should use kwriteconfig5 instead though)

Or search the forums, there have been quite a few threads already about this.