Announcement

Collapse
No announcement yet.

How to get kdesu to use root password instead of user password?

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    [SOLVED] How to get kdesu to use root password instead of user password?

    I've recently installed Kubuntu 14.04 64-bit -- chosen for Pipelight installation support, upgrades rather than clean installs at version end of life, and the familiar KDE/Plasma desktop and Debian derivation, meaning a shorter learning curve. I've been using Mepis 11 exclusively for over a year, and alongside Windows XP for about a year before that, but found it was getting a little too old to be able to support the things I needed to do.

    I note one of the big differences between directly Debian based distros like Mepis and antiX (which I have on my two older computers) and Ubuntu derivatives is that *buntu (at least since version 13) has eliminated direct root login from common use. This isn't a bad thing in terms of logging into the GUI; it's awfully easy to hose your system running the whole machine as root, but since I'm used to having a separate root password (lets me use the same password to administer all Linux installations in the house, separate from my or others' user passwords), I looked up how to activate the root account in Kubuntu, and now I can use su in a shell the way I'm used to doing in Mepis (and already have the habit of promptly closing the shell or exiting the root privilege on finishing my task). Problem is, programs in the Kubuntu menu that need admin privilege still expect my user password, and even editing their launchers to launch via kdesu doesn't get them to start with the root password.

    How can I get kdesu to use the root password instead of the user password that sudo would use, or otherwise launch privileged menu items with root password now that I have it enabled? Not saying it's better my way, just that this is what I'm used to and I don't think it's any less safe or secure than Kubuntu's method.

    #2
    You can do that by adding "Defaults rootpw" in /etc/sudoers or a separate file in /etc/sudoers.d

    Some notes:
    1. Make sure you have a root password set so you're not going lock yourself out.
    2. Recommended editing sudoers file is via visudo (sudo visudo) as it does basic syntax checking before saving (again helps in not locking yourself out)
    3. See 'man sudoers' for more information and details
    4. changing sudoers will affect sudo and kdesudo, but not policykit authentication.

    Comment


      #3
      Originally posted by kubicle View Post
      You can do that by adding "Defaults rootpw" in /etc/sudoers or a separate file in /etc/sudoers.d

      Some notes:
      1. Make sure you have a root password set so you're not going lock yourself out.
      2. Recommended editing sudoers file is via visudo (sudo visudo) as it does basic syntax checking before saving (again helps in not locking yourself out)
      3. See 'man sudoers' for more information and details
      4. changing sudoers will affect sudo and kdesudo, but not policykit authentication.
      Wow, slick. I've added that in a new file, "root", located in /etc/sudoers.d (from Mepis, so it'll be in effect next time I reboot into Kubuntu) -- if I get it wrong and get locked out, I can either delete the file or render it non-parsed by adding a . to the file name or ending it with ~. I'm not sure what authentications are policykit related and which are sudo and kdesudo, but I can probably find out.

      Comment


        #4
        Just posting back to verify that the fix above worked perfectly; my test case, launching Synaptic (yes, less automatic than muon, but I'm used to it), now correctly launches when I type the root password, and gives a "bad password" message and retry box when I type my user password. With this and a few other things (installing the widgets I'm used to) I'm rapidly approaching the comfort zone, less than 24 hours since getting my Kubuntu install to boot (had a couple bad installs before finding and fixing a problem with Live USB creation).

        Comment

        Working...
        X