Home > Techie > Default kdesu to use sudo and not su

Default kdesu to use sudo and not su

Have you recently installed openSUSE 11.0 and added:

username ALL=(ALL) NOPASSWD: ALL

Into your /etc/sudoers files, only to find out now when you launch yast it still prompts for a password?
The issue is actually that kdesu was switched from using sudo to su when elevating priviledges. This was not the behavior in openSUSE 10.3 and earlier versions of 11.0 (RC / Beta etc).

To restore this configuration you can running the following command:
kwriteconfig –file kdesurc –group super-user-command –key super-user-command sudo

Hope this actually helps someone.

Categories: Techie Tags:
  1. ra100
    July 8th, 2008 at 07:49 | #1

    What can i say? Thanks, many thanks.I missed this very much.

  2. blake
    July 8th, 2008 at 08:43 | #2

    It didn’t work on my system :( openSUSE11, using KDE 4.1 beta if that makes any difference. But thanks for trying :) .

  3. tom
    July 8th, 2008 at 09:28 | #3

    Thanks a lot, I had the same annoying problem. For “copy and paste” users, please replace the “–” with “–” in your command.

  4. ben.kevan
    July 8th, 2008 at 10:32 | #4

    Thank you for pointing that out Tom.

    Blake, and others using this.. please note that – in front of group and key are actually 2 dashes

    - – and not just one dash – (there is no space inbetween them)

  5. July 8th, 2008 at 12:14 | #5

    Blake:

    cd ~/.kde4/share/config

    edit kdesurc

    Add this lines:

    [super-user-command]
    super-user-command=sudo

    Work on my opensuse 11.0 KDE 4.0 :D

  6. Ricky
    July 8th, 2008 at 14:00 | #6

    thanks for the tip! it works!

  7. July 8th, 2008 at 17:30 | #7

    Thank you!!! That was driving me crazy! :-)

  8. ben.kevan
    July 8th, 2008 at 19:02 | #8

    Loni from http://forums.opensuse.org posted this:

    Did some research, discovered I have TWO versions of kwriteconfig (and
    others!) installed, one for kde3, another for kde4. imagine it’s because
    I’m running 3.5.9, but with some 4.x apps, so I get both runtimes.

    This can cause issues, because the two programs use slightly different syntax,
    the KDE4 kwriteconfig app uses single dash ‘-’ for options while the KDE3
    version uses double-dash ‘–’. grrr!

    Better solution is to actually create the file entry that command is
    *supposed* to be doing.

    look in .kde/share/config and .kde4/share/config for a file named ‘kdesurc’.

    If it doesn’t exist, create a new file named ‘kdesurc’.

    Add these two lines to the file:

    [super-user-command]
    super-user-command=sudo

    I did both .kde and .kde4 to make sure I catch whichever kdesu is called (v3
    or v4).

    This has worked for me, on both 32bit and 64bit systems, opensuse 11.0, KDE
    3.5.9 installs. Should also fix KDE4.x systems.

    Loni

    Thanks for that update Loni..

  9. JP
    August 27th, 2008 at 05:42 | #9

    Doesn’t seem to work. It accepts the suoder password but no application is launched when typed from the shell( example kdesu /sbin/yast2 ) it just sits there. If I launch it from root it opens.

  10. ben.kevan
    September 9th, 2008 at 20:45 | #10

    JP,

    Make sure you use double – and not a single -. Wordpress puts a double – into a single -.. so copy and paste will not work.

    I’ll have to fix this when I have time.

    Thanks

  11. March 1st, 2009 at 13:56 | #11

    Every time i come here I am not dissapointed, nice post

  1. July 8th, 2008 at 07:56 | #1
  2. July 8th, 2008 at 12:33 | #2
  3. December 10th, 2008 at 07:58 | #3
  4. December 21st, 2008 at 17:11 | #4
  5. January 13th, 2009 at 17:16 | #5