Results 1 to 6 of 6

Thread: How use "sudo" without password?

  1. #1

    Default 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!

  2. #2

    Default AW: How use "sudo" without password?

    Quote Originally Posted by hallergard View Post
    But with Leap42.1 none of this works. Please advise!
    It should work.

    But:
    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:
    Code:
    ## Uncomment to allow members of group wheel to execute any command
    # %wheel ALL=(ALL) ALL
    
    ## Same thing without a password
    %wheel ALL=(ALL) NOPASSWD: ALL
    (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.
    Code:
    username ALL=(ALL) NOPASSWD: ALL

  3. #3

    Default Re: How use "sudo" without password?

    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!

  4. #4

    Default Re: How use "sudo" without password?

    Quote Originally Posted by hallergard View Post
    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.
    "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...
    Last edited by wolfi323; 21-Jan-2016 at 05:06.

  5. #5

    Default Re: AW: How use "sudo" without password?

    Quote Originally Posted by wolfi323 View Post
    Leap 42.1 uses the KF5 based kdesu by default. Its settings are in ~/.config/kdesurc, not ~/.kde4/share/config/kdesurc.
    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

  6. #6

    Default Re: How use "sudo" without password?

    Quote Originally Posted by 6520302 View Post
    Where can I find info on setting this up so sudo does not require me to enter the pw?
    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:
    http://www.freetechie.com/blog/defau...do-and-not-su/
    (for the KF5 version, you should use kwriteconfig5 instead though)

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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •