Logo

SPOT  Spot's Perspective On Technology
Colorful talk in black and white shades of grey.

home
site map
admin

kdesu

2004-02-07 21:03:52

root is the super-user of a Linux system. Security experts recommend that you not routinely run your system as root, but instead run as a regular user. But there are times when you may need to temporarily assume root privileges so that you can perform an otherwise protected operation. Mandrake follows the security recommendations, and in some configurations it can make it very difficult to use graphic interface tools as root. The Mandrake Control Center asks for the root password at startup, and provides access to the most needed functions, but there are exceptions. Some examples of graphic programs you might want to use as root are ethereal and nmap. Both of these need root privilege to gain a lower level access to the ethernet card, and are very limited, or even useless, when used as a normal user. On the command line you can use the su command to launch the program:

su -c ethereal

example of kdesu in action If that seems rather awkward, a more elegant approach is to use the KDE equivalent of su, kdesu. This can open a password dialog, just like the one in the illustration. With a little effort you can add the kdesu wrapper to any menu command where it is needed.

To add kdesu to a menu item, open the Mandrake Control Center and select:

Add the following code in front of the Command field:

/usr/bin/kdesu -c

Be careful to not erase the original command, just add the kdesu command in front of the original command as shown in this screen shot.

Adding kdesu to a command in MenuDrake

Notes

If you are using a Gnome environment, the equivalent to kdesu is gksu

There are other ways you might want to consider to accomplish the goal. sudo can be used to set up policies allowing normal users to perform root functions. It is also possible to suid a program, so that it will run with the owner's privilege, not the user's, but that approach is fraught with very complicated security issues and is usually best to avoid.

Article 9 was last updated 2004-02-10 20:09:58

Add the power of root to GUI applications that need it. (or "Just because Mandrake made an odd decision doesn't mean you have to live with it.")