[arch-general] How do we handle sudo or kdesu in Archlinux?

David C. Rankin, J.D.,P.E. drankinatty at suddenlinkmail.com
Wed May 13 20:18:06 EDT 2009

On Wednesday 13 May 2009 18:17:18 Andrei Thorp wrote:
> I'm very cool with bypassing root-level security checks when
> originating from the physical machine.
> Anyway, another thing you can do is put some scripts in your path that
> override the application that you want to run and then just sudo run
> it. I'm not really sure what PATH KDM (and therefore KDE?) uses, but
> probably has to do something with either your user's .profile or
> root's .profile or bash_profile or something.
> Course, isn't there a way to just elevate your user to be a root-like
> account if you're going to be doing this anyway? Put your user in the
> root group or something.
> -AT

Some times the old ways are still the best:

    After looking for other solutions, I just decided to "dance with the one 
that brung me." kwritconfig works like a champ. To make use of this solution, 
after setting up regular sudo by:

(1)  configuring the sudoers file with 'visudo' as root (you cannot just 
edit /etc/sudoers):

    # visudo

        Then uncomment the following line to enable sudo without a password to 
members of the 'wheel' group:

    %wheel  ALL=(ALL) NOPASSWD: ALL

(2)  Add yourself to the wheel group in /etc/group. Example, in /etc/group:


** If your user name isn't 'david', change as required

(3)  Then within KDE *as your regular user* not root, execute the following 
kwriteconfig command from the command line in konsole or xterm, or from the 
run dialog (Alt+F2):

    kwriteconfig --file kdesurc --group super-user-command --key 
super-user-command sudo

(4)  Your done! You can then run applications as root without a password 
simply by either using the run command (Alt+F2) and choosing "options" or 
using kmenuedit to modify a menu command and select the check box "Run as a 
different user" and enter 'root'. (either save the menu file or just execute 
the Alt+F2 run command.

David C. Rankin, J.D.,P.E.
Rankin Law Firm, PLLC
510 Ochiltree Street
Nacogdoches, Texas 75961
Telephone: (936) 715-9333
Facsimile: (936) 715-9339

More information about the arch-general mailing list